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

Function MJFillInner

src/backend/executor/nodeMergejoin.c:517–546  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

515 * and return it if it passes the non-join quals.
516 */
517static TupleTableSlot *
518MJFillInner(MergeJoinState *node)
519{
520 ExprContext *econtext = node->js.ps.ps_ExprContext;
521 ExprState *otherqual = node->js.ps.qual;
522
523 ResetExprContext(econtext);
524
525 /* If we don't have an inner, return NULL */
526 if(TupIsNull(node->mj_InnerTupleSlot))
527 return NULL;
528
529 econtext->ecxt_outertuple = node->mj_NullOuterTupleSlot;
530 econtext->ecxt_innertuple = node->mj_InnerTupleSlot;
531
532 if (ExecQual(otherqual, econtext))
533 {
534 /*
535 * qualification succeeded. now form the desired projection tuple and
536 * return the slot containing it.
537 */
538 MJ_printf("ExecMergeJoin: returning inner fill tuple\n");
539
540 return ExecProject(node->js.ps.ps_ProjInfo);
541 }
542 else
543 InstrCountFiltered2(node, 1);
544
545 return NULL;
546}
547
548
549/*

Callers 1

ExecMergeJoin_gutsFunction · 0.85

Calls 2

ExecQualFunction · 0.85
ExecProjectFunction · 0.85

Tested by

no test coverage detected