8000 On the stage of a plan node creation use child targetlist to get a li… · postgrespro/aqo@a6be18b · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/sessions-eed3aa0554dd.js" defer="defer">

Commit a6be18b

Browse files
danolivoAndrey Lepikhov
authored andcommitted
On the stage of a plan node creation use child targetlist to get a list of grouping expressions.
1 parent a74ef4a commit a6be18b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

path_utils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,9 @@ aqo_create_plan_hook(PlannerInfo *root, Path *src, Plan **dest)
372372
{
373373
AggPath *ap = (AggPath *) src;
374374

375+
/* Get TLE's from child target list corresponding to the list of exprs. */
375376
List *groupExprs = get_sortgrouplist_exprs(ap->groupClause,
376-
root->processed_tlist);
377+
(*dest)->lefttree->targetlist);
377378
/* Copy bare expressions for further AQO learning case. */
378379
node->grouping_exprs = copyObject(groupExprs);
379380
node->relids = get_list_of_relids(root, ap->subpath->parent->relids);

0 commit comments

Comments
 (0)
0