Github user okram commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/621#discussion_r121703249
--- Diff:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
---
@@ -99,6 +99,19 @@ public void modulateBy(final Traversal.Admin<?, ?>
traversal, final Comparator c
}
@Override
+ public void replaceLocalChild(final Traversal.Admin<?, ?>
oldTraversal, final Traversal.Admin<?, ?> newTraversal) {
+ int i = 0;
+ for (final Pair<Traversal.Admin<S, C>, Comparator<C>> pair :
this.comparators) {
+ final Traversal.Admin<S, C> traversal = pair.getValue0();
+ if (null != traversal && traversal.equals(oldTraversal)) {
+ this.comparators.set(i,
Pair.with(this.integrateChild(newTraversal), pair.getValue1()));
--- End diff --
I would add a test case to `OrderTest` (if it doesn't already exist) that
verifies that your strategy works as `OrderXXXStep` is complicated with how it
deals with comparators. Thus, add a `...order().by(label())...`-style test so
we know all is good (in the proverbial hood).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---