Function sql::plan::transform_expr::try_simplify_quantified_comparisons [−][src]
pub fn try_simplify_quantified_comparisons(expr: &mut HirRelationExpr)
Expand description
Rewrites quantified comparisons into simpler EXISTS operators.
Note that this transformation is only valid when the expression is
used in a context where the distinction between FALSE
and NULL
is immaterial, e.g., in a WHERE
clause or a CASE
condition, or
when the inputs to the comparison are non-nullable. This function is careful
to only apply the transformation when it is valid to do so.
WHERE (SELECT any(
WHERE (SELECT all(
See Section 3.5 of “Execution Strategies for SQL Subqueries” by M. Elhemali, et al.