Class PlanNodeSearcher
java.lang.Object
io.trino.sql.planner.optimizations.PlanNodeSearcher
-
Method Summary
Modifier and TypeMethodDescriptionintcount()findAll()Return a list of matching nodes ordered as in pre-order traversal of the plan tree.booleanmatches()recurseOnlyWhen(Predicate<PlanNode> skipOnly) replaceAll(PlanNode newPlanNode) replaceFirst(PlanNode newPlanNode) static PlanNodeSearchersearchFrom(PlanNode node) static PlanNodeSearchersearchFrom(PlanNode node, Lookup lookup) Use it in optimizerRuleonly if you truly do not have a better optionfinal PlanNodeSearcherwhereIsInstanceOfAny(Class<? extends PlanNode>... classes) final PlanNodeSearcherwhereIsInstanceOfAny(List<Class<? extends PlanNode>> classes)
-
Method Details
-
searchFrom
-
searchFrom
Use it in optimizerRuleonly if you truly do not have a better optionTODO: replace it with a support for plan (physical) properties in rules pattern matching
-
whereIsInstanceOfAny
@SafeVarargs public final PlanNodeSearcher whereIsInstanceOfAny(Class<? extends PlanNode>... classes) -
whereIsInstanceOfAny
-
where
-
recurseOnlyWhen
-
findFirst
-
findAll
Return a list of matching nodes ordered as in pre-order traversal of the plan tree. -
findOnlyElement
-
removeAll
-
removeFirst
-
replaceAll
-
replaceFirst
-
matches
public boolean matches() -
count
public int count()
-