Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/621#discussion_r123745535
--- Diff:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java
---
@@ -79,6 +79,14 @@ public void modulateBy(final Traversal.Admin<?, ?>
kvTraversal) {
}
@Override
+ public void replaceLocalChild(final Traversal.Admin<?, ?>
oldTraversal, final Traversal.Admin<?, ?> newTraversal) {
+ if (null != this.keyTraversal &&
this.keyTraversal.equals(oldTraversal))
+ this.keyTraversal = this.integrateChild(newTraversal);
+ else if (null != this.valueTraversal &&
this.valueTraversal.equals(oldTraversal))
--- End diff --
No, that's what I'm saying. Think about the scenarios in which this
strategy kicks in. It will only replace the traversal, if there's a single step
(`id()` or `label()`, later possibly also `key()` or `value()`).
Now, looking at the barrier manipulation code:
```
this.barrierStep =
TraversalHelper.getFirstStepOfAssignableClass(Barrier.class,
this.valueTraversal).orElse(null);
```
There will never be a `BarrierStep`, hence `this.barrierStep` will always
be and will stay `null`.
```
this.setReducingBiOperator(new GroupBiOperator<>(null == this.barrierStep ?
Operator.assign : this.barrierStep.getMemoryComputeKey().getReducer()));
```
Since `this.barrierStep` will always be `null`, the reducing operator will
always be (and stay) `assign`.
---
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.
---