Class PushProjectionThroughExchange
java.lang.Object
io.trino.sql.planner.iterative.rule.PushProjectionThroughExchange
- All Implemented Interfaces:
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.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ProjectNode project, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
PushProjectionThroughExchange
public PushProjectionThroughExchange()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<ProjectNode>
-
apply
- Specified by:
applyin interfaceRule<ProjectNode>
-