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

Function ExecMaterialMarkPos

src/backend/executor/nodeMaterial.c:384–404  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecMaterialMarkPos * * Calls tuplestore to save the current position in the stored file. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

382 * ----------------------------------------------------------------
383 */
384void
385ExecMaterialMarkPos(MaterialState *node)
386{
387 Assert(node->eflags & EXEC_FLAG_MARK);
388
389 /*
390 * if we haven't materialized yet, just return.
391 */
392 if (!node->tuplestorestate)
393 return;
394
395 /*
396 * copy the active read pointer to the mark.
397 */
398 tuplestore_copy_read_pointer(node->tuplestorestate, 0, 1);
399
400 /*
401 * since we may have advanced the mark, try to truncate the tuplestore.
402 */
403 tuplestore_trim(node->tuplestorestate);
404}
405
406/* ----------------------------------------------------------------
407 * ExecMaterialRestrPos

Callers 1

ExecMarkPosFunction · 0.85

Calls 2

tuplestore_trimFunction · 0.85

Tested by

no test coverage detected