Skip to content

Exists — Correlated Predicate Subquery Expression

Exists is a SubqueryExpression and a predicate expression.

Exists is <> when:

  • ResolveSubquery is requested to resolveSubQueries

  • PullupCorrelatedPredicates is requested to[rewriteSubQueries]

  • AstBuilder is requested to sql/[visitExists] (in SQL statements)

[[Unevaluable]] Exists is unevaluable expression.

[[eval]][[doGenCode]] When requested to evaluate or doGenCode, Exists simply reports a UnsupportedOperationException.

Cannot evaluate expression: [this]

[[nullable]] Exists is never[nullable].

[[toString]] Exists uses the following text representation:

exists#[exprId] [conditionString]

[[canonicalized]] When requested for a canonicalized version, Exists <> a new instance with...FIXME

Creating Instance

Exists takes the following to be created: