You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Matt Frantz (JIRA)" <ji...@apache.org> on 2015/07/23 01:22:04 UTC

[jira] [Commented] (TINKERPOP3-781) Local aggregation should not destroy path

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

Matt Frantz commented on TINKERPOP3-781:
----------------------------------------

Perhaps {{ReducingBarrierStep.processNextStart}} could be changed as follows.  Right now, it generates a new traverser "from scratch" (i.e. from the root traversal).  Instead, it needs to ask its traverser for a new traverser via a new API on {{Traverser.Admin}}, like {{newReducedTraverser}}.  By default, this would provide one from scratch.  {{LocalStep}} could then provide an alternate "wrapped" traverser as a start for its child traversal.  The wrapper would override {{newReducedTraverser}} to provide the traverser split from the entry into the local traversal.

> Local aggregation should not destroy path
> -----------------------------------------
>
>                 Key: TINKERPOP3-781
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-781
>             Project: TinkerPop 3
>          Issue Type: Improvement
>            Reporter: Matt Frantz
>
> Currently, if we do an aggregating step (e.g. {{fold}}, {{groupCount}}, etc.) within the {{local}} step, we lose the path information.
> {noformat}
> gremlin> g.V(1).as('a').local(both().fold()).as('b').select('a', 'b')
> ==>[b:[v[3], v[2], v[4]]]
> {noformat}
> It would be better if the preceding portion of the path (step "a" in the example) were still retained.  Like so:
> {noformat}
> gremlin> g.V(1).as('a').local(both().fold()).as('b').select('a', 'b')
> ==>[a:v[1], b:[v[3], v[2], v[4]]]
> {noformat}



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