You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Daniel Kuppitz (JIRA)" <ji...@apache.org> on 2015/12/21 14:14:46 UTC

[jira] [Created] (TINKERPOP-1057) GroupSideEffectStep doesn't use provided maps

Daniel Kuppitz created TINKERPOP-1057:
-----------------------------------------

             Summary: 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.1.1-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)