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

Function MJFillOuter

src/backend/executor/nodeMergejoin.c:483–511  ·  view source on GitHub ↗

* Generate a fake join tuple with nulls for the inner tuple, * and return it if it passes the non-join quals. */

Source from the content-addressed store, hash-verified

481 * and return it if it passes the non-join quals.
482 */
483static TupleTableSlot *
484MJFillOuter(MergeJoinState *node)
485{
486 ExprContext *econtext = node->js.ps.ps_ExprContext;
487 ExprState *otherqual = node->js.ps.qual;
488
489 ResetExprContext(econtext);
490
491 econtext->ecxt_outertuple = node->mj_OuterTupleSlot;
492 econtext->ecxt_innertuple = node->mj_NullInnerTupleSlot;
493
494 if (TupIsNull(node->mj_OuterTupleSlot))
495 return NULL;
496
497 if (ExecQual(otherqual, econtext))
498 {
499 /*
500 * qualification succeeded. now form the desired projection tuple and
501 * return the slot containing it.
502 */
503 MJ_printf("ExecMergeJoin: returning outer fill tuple\n");
504
505 return ExecProject(node->js.ps.ps_ProjInfo);
506 }
507 else
508 InstrCountFiltered2(node, 1);
509
510 return NULL;
511}
512
513/*
514 * Generate a fake join tuple with nulls for the outer tuple,

Callers 1

ExecMergeJoin_gutsFunction · 0.85

Calls 2

ExecQualFunction · 0.85
ExecProjectFunction · 0.85

Tested by

no test coverage detected