Class PushDownDereferencesThroughMarkDistinct
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.PushDownDereferencesThroughMarkDistinct
-
- All Implemented Interfaces:
Rule<ProjectNode>
public class PushDownDereferencesThroughMarkDistinct extends Object implements Rule<ProjectNode>
Transforms:Project(D := f1(A.x), E := f2(B.x), G := f3(C)) MarkDistinct(distinctSymbols = [B]) Source(A, B, C)
to:Project(D := f1(symbol), E := f2(B.x), G := f3(C)) MarkDistinct(distinctSymbols = [B]) Project(A, B, C, symbol := A.x) Source(A, B, C)
Pushes down dereference projections through MarkDistinct. Excludes dereferences on "distinct symbols" to avoid data replication, since these symbols cannot be pruned.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PushDownDereferencesThroughMarkDistinct(TypeAnalyzer typeAnalyzer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Result
apply(ProjectNode projectNode, Captures captures, Rule.Context context)
Pattern<ProjectNode>
getPattern()
Returns a pattern to which plan nodes this rule applies.
-
-
-
Constructor Detail
-
PushDownDereferencesThroughMarkDistinct
public PushDownDereferencesThroughMarkDistinct(TypeAnalyzer typeAnalyzer)
-
-
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 projectNode, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<ProjectNode>
-
-