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

Function make_nulltest_from_distinct

src/backend/parser/parse_expr.c:3147–3162  ·  view source on GitHub ↗

* Produce a NullTest node from an IS [NOT] DISTINCT FROM NULL construct * * "arg" is the untransformed other argument */

Source from the content-addressed store, hash-verified

3145 * "arg" is the untransformed other argument
3146 */
3147static Node *
3148make_nulltest_from_distinct(ParseState *pstate, A_Expr *distincta, Node *arg)
3149{
3150 NullTest *nt = makeNode(NullTest);
3151
3152 nt->arg = (Expr *) transformExprRecurse(pstate, arg);
3153 /* the argument can be any type, so don't coerce it */
3154 if (distincta->kind == AEXPR_NOT_DISTINCT)
3155 nt->nulltesttype = IS_NULL;
3156 else
3157 nt->nulltesttype = IS_NOT_NULL;
3158 /* argisrow = false is correct whether or not arg is composite */
3159 nt->argisrow = false;
3160 nt->location = distincta->location;
3161 return (Node *) nt;
3162}
3163
3164/*
3165 * Produce a string identifying an expression by kind.

Callers 1

transformAExprDistinctFunction · 0.85

Calls 1

transformExprRecurseFunction · 0.85

Tested by

no test coverage detected