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

Function isJoinExprNull

src/backend/executor/execExpr.c:4322–4349  ·  view source on GitHub ↗

---------------------------------------------------------------- * isJoinExprNull * * Checks if the join expression evaluates to NULL for a given * input tuple. * * The input tuple has to be present in the correct TupleTableSlot * in the ExprContext. For example, if all the expressions * in joinExpr refer to the inner side of the join, * econtext->ecxt_innertuple must be valid. * -------

Source from the content-addressed store, hash-verified

4320 * ----------------------------------------------------------------
4321 */
4322bool
4323isJoinExprNull(List *joinExpr, ExprContext *econtext)
4324{
4325 ListCell *lc;
4326 bool joinkeys_null = true;
4327
4328 Assert(joinExpr != NIL);
4329
4330 foreach(lc, joinExpr)
4331 {
4332 ExprState *keyexpr = (ExprState *) lfirst(lc);
4333 bool isNull = false;
4334
4335 /*
4336 * Evaluate the current join attribute value of the tuple
4337 */
4338 ExecEvalExpr(keyexpr, econtext, &isNull);
4339
4340 if (!isNull)
4341 {
4342 /* Found at least one non-null join expression, we're done */
4343 joinkeys_null = false;
4344 break;
4345 }
4346 }
4347
4348 return joinkeys_null;
4349}
4350
4351
4352

Callers 2

ExecHashJoinImplFunction · 0.85
ExecNestLoop_gutsFunction · 0.85

Calls 2

ExecEvalExprFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected