Exists — Correlated Predicate Subquery Expression
Exists
is a SubqueryExpression and a predicate expression (i.e. the result data type is always boolean).
Exists
is created when:
-
ResolveSubquery
is requested to resolveSubQueries -
PullupCorrelatedPredicates
is requested to rewriteSubQueries -
AstBuilder
is requested to visitExists (in SQL statements)
Exists
cannot be evaluated, i.e. produce a value given an internal row.
1 2 3 4 5 |
Cannot evaluate expression: [this] |
Exists
is never nullable.
Exists
uses the following text representation:
1 2 3 4 5 |
exists#[exprId] [conditionString] |
When requested for a canonicalized version, Exists
creates a new instance with…FIXME
Creating Exists Instance
Exists
takes the following when created:
-
Subquery logical plan
-
Child expressions