https://issues.apache.org/jira/browse/TINKERPOP-2095

This PR fixes a bug that somehow managed to stay unnoticed for years.

Prior this PR we got this:

```
gremlin> 
g.V().hasLabel('person').as('p').out('created').group().by('name').by(select('p').values('age').sum())
java.lang.Long cannot be cast to 
org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet
```

Now we get this:

```
gremlin> 
g.V().hasLabel('person').as('p').out('created').group().by('name').by(select('p').values('age').sum())
==>[ripple:32,lop:96]
```

The fix was made for both - `GroupStep` and `GroupSideEffectStep`. I also had 
to fix `ComputerVerificationStrategy`; it didn't detect that 
`select('p').values('age')` is leaving the star-graph.

Without the `ComputerVerificationStrategy` fix:

```
gremlin> 
g.V().hasLabel('person').as('p').out('created').group().by('name').by(select('p').values('age').sum())
==>[ripple:0,lop:0]
```

With the `ComputerVerificationStrategy` fix:

```
gremlin> 
g.V().hasLabel('person').as('p').out('created').group().by('name').by(select('p').values('age').sum())
Local traversals may not traverse past the local star-graph on GraphComputer: 
[SelectOneStep(last,p), PropertiesStep([age],value), SumGlobalStep]
```

`docker/build.sh -t -i -n` passed.

VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/997 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

Reply via email to