Class PushProjectionThroughExchange
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.PushProjectionThroughExchange
-
- All Implemented Interfaces:
Rule<ProjectNode>
public class PushProjectionThroughExchange extends Object implements Rule<ProjectNode>
Transforms:Project(x = e1, y = e2) Exchange() Source(a, b, c)
to:Exchange() Project(x = e1, y = e2) Source(a, b, c)
Or if Exchange needs symbols from Source for partitioning, ordering or as hash symbol to:Project(x, y) Exchange() Project(x = e1, y = e2, a) Source(a, b, c)
To avoid looping this optimizer will not be fired if upper Project contains just symbol references.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PushProjectionThroughExchange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Result
apply(ProjectNode project, Captures captures, Rule.Context context)
Pattern<ProjectNode>
getPattern()
Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<ProjectNode> getPattern()
Description copied from interface:Rule
Returns a pattern to which plan nodes this rule applies.- Specified by:
getPattern
in interfaceRule<ProjectNode>
-
apply
public Rule.Result apply(ProjectNode project, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<ProjectNode>
-
-