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 2018/02/20 18:59:00 UTC

[jira] [Assigned] (TINKERPOP-1522) Order of select() scopes

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

Daniel Kuppitz reassigned TINKERPOP-1522:
-----------------------------------------

    Assignee: Daniel Kuppitz

> Order of select() scopes
> ------------------------
>
>                 Key: TINKERPOP-1522
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1522
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.3
>            Reporter: Daniel Kuppitz
>            Assignee: Daniel Kuppitz
>            Priority: Major
>              Labels: breaking
>
> As it currently stands, side-effects have the highest priority when a key is {{select()}}'ed. I just ran into a problem where this behavior was more than disadvantageous:
> {code}
> gremlin> g = TinkerGraph.open().traversal()
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> g.withSideEffect("a", ["a": "marko"]).inject(1).select("a").select("a") // expected result is "marko", not "[a:marko]"
> ==>[a:marko]
> {code}
> In my use-case the map keys were not predictable, hence it's almost impossible to prevent a key name collision. IMO maps (and paths) should take precedence over side-effects.
> It is still possible to get the nested {{a}} key, but I'm pretty sure that the common Gremlin user won't be able to come up with this query:
> {code}
> gremlin> g.withSideEffect("a", ["a": "marko"]).inject(1).select("a").
>            map(unfold().filter(select(keys).is("a")).select(values))
> ==>marko
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)