Skip to content

Commit 3ad1cd4

Browse files
committed
change implements to new node
1 parent 75cdefc commit 3ad1cd4

File tree

17 files changed

+513
-105
lines changed

17 files changed

+513
-105
lines changed

src/backend/cdb/cdbllize.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,7 @@ motion_sanity_walker(Node *node, sanity_result_t *result)
15061506
{
15071507
case T_Result:
15081508
case T_WindowAgg:
1509+
case T_WindowHashAgg:
15091510
case T_TableFunctionScan:
15101511
case T_ShareInputScan:
15111512
case T_Append:

src/backend/cdb/cdbplan.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,25 @@ plan_tree_mutator(Node *node,
694694
return (Node *) newwindow;
695695
}
696696
break;
697+
case T_WindowHashAgg:
698+
{
699+
WindowHashAgg *window = (WindowHashAgg *) node;
700+
WindowHashAgg *newwindow;
701+
702+
FLATCOPY(newwindow, window, WindowHashAgg);
703+
PLANMUTATE(newwindow, window);
704+
705+
COPYARRAY(newwindow, window, partNumCols, partColIdx);
706+
COPYARRAY(newwindow, window, partNumCols, partOperators);
707+
708+
COPYARRAY(newwindow, window, ordNumCols, ordColIdx);
709+
COPYARRAY(newwindow, window, ordNumCols, ordOperators);
710+
MUTATE(newwindow->startOffset, window->startOffset, Node *);
711+
MUTATE(newwindow->endOffset, window->endOffset, Node *);
712+
713+
return (Node *) newwindow;
714+
}
715+
break;
697716

698717
case T_Unique:
699718
{

src/backend/cdb/cdbtargeteddispatch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ DirectDispatchUpdateContentIdsFromPlan(PlannerInfo *root, Plan *plan)
522522
DisableTargetedDispatch(&dispatchInfo);
523523
break;
524524
case T_WindowAgg:
525+
case T_WindowHashAgg:
525526
case T_TableFunctionScan:
526527
case T_RecursiveUnion:
527528
/* no change to dispatchInfo */

src/backend/executor/nodeWindowAgg.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,9 +2617,6 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags)
26172617
TupleDesc scanDesc;
26182618
ListCell *l;
26192619

2620-
// not support window hash agg
2621-
Assert(!node->isWindowHashAgg);
2622-
26232620
/* check for unsupported flags */
26242621
Assert(!(eflags & (EXEC_FLAG_BACKWARD | EXEC_FLAG_MARK)));
26252622

0 commit comments

Comments
 (0)