MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecReScanWindowAgg

Function ExecReScanWindowAgg

src/backend/executor/nodeWindowAgg.c:2938–2971  ·  view source on GitHub ↗

----------------- * ExecReScanWindowAgg * ----------------- */

Source from the content-addressed store, hash-verified

2936 * -----------------
2937 */
2938void
2939ExecReScanWindowAgg(WindowAggState *node)
2940{
2941 PlanState *outerPlan = outerPlanState(node);
2942 ExprContext *econtext = node->ss.ps.ps_ExprContext;
2943
2944 node->all_done = false;
2945 node->all_first = true;
2946
2947 /* release tuplestore et al */
2948 release_partition(node);
2949
2950 /* release all temp tuples, but especially first_part_slot */
2951 ExecClearTuple(node->ss.ss_ScanTupleSlot);
2952 ExecClearTuple(node->first_part_slot);
2953 ExecClearTuple(node->agg_row_slot);
2954 ExecClearTuple(node->temp_slot_1);
2955 ExecClearTuple(node->temp_slot_2);
2956 if (node->framehead_slot)
2957 ExecClearTuple(node->framehead_slot);
2958 if (node->frametail_slot)
2959 ExecClearTuple(node->frametail_slot);
2960
2961 /* Forget current wfunc values */
2962 MemSet(econtext->ecxt_aggvalues, 0, sizeof(Datum) * node->numfuncs);
2963 MemSet(econtext->ecxt_aggnulls, 0, sizeof(bool) * node->numfuncs);
2964
2965 /*
2966 * if chgParam of subnode is not null then plan will be re-scanned by
2967 * first ExecProcNode.
2968 */
2969 if (outerPlan->chgParam == NULL)
2970 ExecReScan(outerPlan);
2971}
2972
2973void
2974ExecSquelchWindowAgg(WindowAggState *node, bool force)

Callers 1

ExecReScanFunction · 0.85

Calls 3

release_partitionFunction · 0.85
ExecClearTupleFunction · 0.85
ExecReScanFunction · 0.85

Tested by

no test coverage detected