Expand description
Transformations of SQL IR, before decorrelation.
StaticsΒ§
- NO_
PARAMS π - An empty parameter type map.
FunctionsΒ§
- column_
type π - from_
less_ πexistence_ predicate - If
subis a FROM-less subquery (seesimplify_from_less_existence_subqueries) whose existence check is correlated on the outer row, returns the predicatep1 AND p2 AND ...expressed in the outer rowβs frame. ReturnsNoneotherwise. - fuse_
window_ functions - Aims and scope
- resolve_
local_ πcolumns - Returns
exprwith every reference to the current scope (aColumnRefwithlevel == 0) replaced by its value fromenv. ReturnsNoneifexprcannot be soundly lifted into the outer scope, or references a column absent fromenv. - simplify_
from_ less_ existence_ subqueries - Collapses
EXISTSover a FROM-less subquery into an equivalent scalar predicate on the outer row, so that decorrelation produces a plainFilterrather than a semijoin (forEXISTS) or an antijoin (forNOT EXISTS). - split_
subquery_ predicates - Rewrites predicates that contain subqueries so that the subqueries appear in their own later predicate when possible.
- try_
simplify_ quantified_ comparisons - Rewrites quantified comparisons into simpler EXISTS operators.