Class UnwrapSingleColumnRowInApply
java.lang.Object
io.trino.sql.planner.iterative.rule.UnwrapSingleColumnRowInApply
Given x::row(t) and y::row(t), converts assignments of the form
x IN (y...) => x[1] IN (y[1]...)
and
x <comparison> <quantifier> (y...)
x[1] <comparison> <quantifier> (y[1]...)
In particular, it transforms a plan with the following shape:
- Apply x IN y - S [x :: row(T)] - Q [y :: row(T)]
into
- Project (to preserve the outputs of Apply)
- Apply x' IN y'
- Project [x' :: T]
x' = x[1]
- S [x :: row(T)]
- Project [y' :: T]
y' = y[1]
- Q [y :: row(T)]
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ApplyNode node, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.