[
https://issues.apache.org/jira/browse/TINKERPOP-1522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16388288#comment-16388288
]
ASF GitHub Bot commented on TINKERPOP-1522:
-------------------------------------------
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/803#discussion_r172619337
--- Diff: docs/src/upgrade/release-3.4.x.asciidoc ---
@@ -28,3 +28,8 @@ NEED AN IMAGE
Please see the
link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asciidoc#release-3-4-0[changelog]
for a complete list of all the modifications that are part of this release.
=== Upgrading for Users
+
+==== Change in order of select() scopes
+
+The order of select scopes has been changed to: maps, side-effects, paths
+Previously the order was: side-effects, maps, paths - which made it almost
impossible to select a specific map entry if a side-effect with the same name
existed.
--- End diff --
two things:
1. Could you go the extra step and add an example of the behavior
before/after the change. I think people would understand it better if they
could see the example (remember the source in upgrade is static so you should
just copy/paste the example from your console)
2. note that we typically add a link to the relevant JIRA ticket:
https://github.com/apache/tinkerpop/blame/master/docs/src/upgrade/release-3.3.x.asciidoc#L53
> 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)