* Generate a fake join tuple with nulls for the inner tuple, * and return it if it passes the non-join quals. */
| 481 | * and return it if it passes the non-join quals. |
| 482 | */ |
| 483 | static TupleTableSlot * |
| 484 | MJFillOuter(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, |
no test coverage detected