[ 
https://issues.apache.org/jira/browse/TINKERPOP-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15174065#comment-15174065
 ] 

Marko A. Rodriguez commented on TINKERPOP-1188:
-----------------------------------------------

The problem is here:

https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java#L89-L90

What should be happening is that we wrap the {{this.starts}} in a "splitting 
iterator" which will then automatically push traversers into other branches 
when one branch continues to {{next()}}.

> Semantics of BarrierSteps in TraversalParent global traversals is wrong.
> ------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1188
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1188
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.1.1-incubating
>            Reporter: Marko A. Rodriguez
>
> Suppose the following traversal:
> {code}
> g.V.union(outE().count(), inE().count())
> {code}
> Given that {{count()}} is a {{ReducingBarrierStep}} and thus, continues to 
> pull until there are no more results, you would expect the result set to be:
> {code}
> [6,6]
> {code}
> However, its actually this:
> {code}
> [3,0]
> [0,1]
> [0,3]
> [2,1]
> [0,1]
> [1,0]
> {code}
> That is, for each traverser into {{union()}}, the {{count()}} is calculated.
> In OLAP, the result is {{[6,6]}} as expected.
> What should we do?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to