Skip to main content

Module rewrite_set_comparison

Module rewrite_set_comparison 

Source
Expand description

Optimizer rule rewriting SetComparison subqueries (e.g. = ANY, > ALL) into boolean expressions built from EXISTS subqueries that capture SQL three-valued logic.

Structsยง

RewriteSetComparison
Rewrite SetComparison expressions to scalar subqueries that return the correct boolean value (including SQL NULL semantics). After this rule runs, later rules such as ScalarSubqueryToJoin can decorrelate and remove the remaining subquery.