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 spark-sql-PullupCorrelatedPredicates.md#rewriteSubQueries[rewriteSubQueries]

  • AstBuilder is requested to sql/AstBuilder.md#visitExists[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 Expression.md#nullable[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:


Last update: 2021-02-18
Back to top