[ 
https://issues.apache.org/jira/browse/TINKERPOP-1057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marko A. Rodriguez updated TINKERPOP-1057:
------------------------------------------
    Fix Version/s:     (was: 3.1.1-incubating)
                   3.2.0-incubating

> GroupSideEffectStep doesn't use provided maps
> ---------------------------------------------
>
>                 Key: TINKERPOP-1057
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1057
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.0.2-incubating
>            Reporter: Daniel Kuppitz
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.2.0-incubating
>
>
> {{GroupSideEffectStep}} doesn't seem to use maps that are provided via 
> {{withSideEffect()}}.
> Here's what we expect (note that this is {{groupCount}}, which works fine):
> {noformat}
> gremlin> g = TinkerFactory.createModern().traversal()
> ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
> gremlin> m = ["marko":1L]; g.withSideEffect("m", 
> m).V().groupCount("m").by("name").iterate(); m
> ==>marko=2
> ==>vadas=1
> ==>lop=1
> ==>josh=1
> ==>ripple=1
> ==>peter=1
> {noformat}
> Now the same using {{group}}:
> {noformat}
> gremlin> m = ["marko":1]; g.withSideEffect("m", 
> m).V().group("m").by("name").by(constant(1).sum()).iterate(); m
> ==>marko=1
> {noformat}
> This is the first issue; {{group()}} doesn't update the map entries at all. 
> However, if we use {{cap()}}, we can see a different behavior:
> {noformat}
> gremlin> m = ["marko":1]; g.withSideEffect("m", 
> m).V().group("m").by("name").by(constant(1).sum()).cap("m").next()
> ==>marko=1
> ==>ripple=1
> ==>peter=1
> ==>vadas=1
> ==>josh=1
> ==>lop=1
> gremlin> m
> ==>marko=1
> ==>ripple=1
> ==>peter=1
> ==>vadas=1
> ==>josh=1
> ==>lop=1
> {noformat}
> This would be the correct result with no provided initial {{m}}, but since we 
> initialized {{marko}} with {{1}}, the result should contain {{marko=2}}, as 
> shown in the {{groupCount()}} example above.



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

Reply via email to