vkagamlyk commented on code in PR #2504:
URL: https://github.com/apache/tinkerpop/pull/2504#discussion_r1500988717
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/FilterRankingStrategy.java:
##########
@@ -232,4 +243,64 @@ public Set<Class<? extends OptimizationStrategy>>
applyPrior() {
public static FilterRankingStrategy instance() {
return INSTANCE;
}
+
+ /**
+ * Get steps of the specified class throughout the traversal and grouping
them based on the traversal parent
+ * collecting them in a fashion that orders them from the deepest steps
first
+ */
+ public static List<Pair<TraversalParent, List<Step<?,?>>>>
collectStepsOfAssignableClassRecursivelyFromDepthGroupedByParent(
+ final Traversal.Admin<?, ?> traversal, final Class<?> stepClass) {
+
+ final List<Pair<TraversalParent, List<Step<?,?>>>> collectionList =
new ArrayList<>();
+ final Stack<Step<?,?>> stack = new Stack<>();
Review Comment:
nit: not informative variable names. may be something like
`unprocessedSteps` will be better?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]