Class EliminateCrossJoins
java.lang.Object
io.trino.sql.planner.iterative.rule.EliminateCrossJoins
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
ConstructorsConstructorDescriptionEliminateCrossJoins(PlannerContext plannerContext, TypeAnalyzer typeAnalyzer) -
Method Summary
Modifier and TypeMethodDescriptionapply(JoinNode node, Captures captures, Rule.Context context) static PlanNodebuildJoinTree(List<Symbol> expectedOutputSymbols, JoinGraph graph, List<Integer> joinOrder, PlanNodeIdAllocator idAllocator) getJoinOrder(JoinGraph graph) Given JoinGraph determine the order of joins between graph nodes by traversing JoinGraph.Returns a pattern to which plan nodes this rule applies.booleanstatic booleanisOriginalOrder(List<Integer> joinOrder)
-
Constructor Details
-
EliminateCrossJoins
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<JoinNode>
-
isEnabled
-
apply
-
isOriginalOrder
-
getJoinOrder
Given JoinGraph determine the order of joins between graph nodes by traversing JoinGraph. Any graph traversal algorithm could be used here (like BFS or DFS), but we use PriorityQueue to preserve original JoinOrder as mush as it is possible. PriorityQueue returns next nodes to join in order of their occurrence in original Plan. -
buildJoinTree
-