Class UnwrapSingleColumnRowInApply
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.UnwrapSingleColumnRowInApply
-
public class UnwrapSingleColumnRowInApply extends Object implements Rule<ApplyNode>
Given x::row(t) and y::row(t), converts assignments of the formx 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 Constructor Description UnwrapSingleColumnRowInApply(TypeAnalyzer typeAnalyzer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(ApplyNode node, Captures captures, Rule.Context context)Pattern<ApplyNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Constructor Detail
-
UnwrapSingleColumnRowInApply
public UnwrapSingleColumnRowInApply(TypeAnalyzer typeAnalyzer)
-
-
Method Detail
-
getPattern
public Pattern<ApplyNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<ApplyNode>
-
apply
public Rule.Result apply(ApplyNode node, Captures captures, Rule.Context context)
-
-