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

Function is_exprs_nullable

src/backend/cdb/cdbsubselect.c:1401–1419  ·  view source on GitHub ↗

* is_exprs_nullable * Return true if any of the exprs might be null, otherwise false. * We want to be conservative for those cases either we are not * interested or not sure. */

Source from the content-addressed store, hash-verified

1399 * interested or not sure.
1400 */
1401static bool
1402is_exprs_nullable(Node *exprs, Query *query)
1403{
1404 NonNullableVarsContext context;
1405 context.query = query;
1406 context.nonNullableVars = NIL;
1407 context.nullableVars = NIL;
1408
1409 /* Find nullable vars in the jointree */
1410 (void) expression_tree_walker((Node *) query->jointree,
1411 cdb_find_nonnullable_vars_walker, &context);
1412
1413 /*
1414 * Eliminate potential nullable vars.
1415 */
1416 context.nonNullableVars = list_difference(context.nonNullableVars, context.nullableVars);
1417
1418 return is_exprs_nullable_internal(exprs, context.nonNullableVars);
1419}
1420
1421static bool
1422is_exprs_nullable_internal(Node *exprs, List *nonnullable_vars)

Callers 1

convert_IN_to_antijoinFunction · 0.85

Calls 3

expression_tree_walkerFunction · 0.85
list_differenceFunction · 0.85

Tested by

no test coverage detected