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

Function ExecReScanMergeAppend

src/backend/executor/nodeMergeAppend.c:361–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void
362ExecReScanMergeAppend(MergeAppendState *node)
363{
364 int i;
365
366 /*
367 * If any PARAM_EXEC Params used in pruning expressions have changed, then
368 * we'd better unset the valid subplans so that they are reselected for
369 * the new parameter values.
370 */
371 if (node->ms_prune_state &&
372 bms_overlap(node->ps.chgParam,
373 node->ms_prune_state->execparamids))
374 {
375 bms_free(node->ms_valid_subplans);
376 node->ms_valid_subplans = NULL;
377 }
378
379 for (i = 0; i < node->ms_nplans; i++)
380 {
381 PlanState *subnode = node->mergeplans[i];
382
383 /*
384 * ExecReScan doesn't know about my subplans, so I have to do
385 * changed-parameter signaling myself.
386 */
387 if (node->ps.chgParam != NULL)
388 UpdateChangedParamSet(subnode, node->ps.chgParam);
389
390 /*
391 * If chgParam of subnode is not null then plan will be re-scanned by
392 * first ExecProcNode.
393 */
394 if (subnode->chgParam == NULL)
395 ExecReScan(subnode);
396 }
397 binaryheap_reset(node->ms_heap);
398 node->ms_initialized = false;
399}
400
401void
402ExecSquelchMergeAppend(MergeAppendState *node, bool force)

Callers 1

ExecReScanFunction · 0.85

Calls 5

bms_overlapFunction · 0.85
bms_freeFunction · 0.85
UpdateChangedParamSetFunction · 0.85
ExecReScanFunction · 0.85
binaryheap_resetFunction · 0.85

Tested by

no test coverage detected