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:

  1. ResolveSubquery is requested to resolveSubQueries

  2. PullupCorrelatedPredicates is requested to rewriteSubQueries

  3. AstBuilder is requested to visitExists (in SQL statements)

Exists cannot be evaluated, i.e. produce a value given an internal row.

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

Cannot evaluate expression: [this]

Exists is never nullable.

Exists uses the following text representation:

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:

results matching ""

    No results matching ""