added a note in upgrade docs regarding the change of order of select scopes


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/abc11c87
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/abc11c87
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/abc11c87

Branch: refs/heads/master
Commit: abc11c8720b2eeb25163fdc1d9e86f0b4ab07d6f
Parents: 26684e3
Author: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Authored: Fri Mar 2 22:39:05 2018 -0700
Committer: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Committed: Wed Mar 7 08:45:24 2018 -0700

----------------------------------------------------------------------
 docs/src/upgrade/release-3.4.x.asciidoc | 43 +++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/abc11c87/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc 
b/docs/src/upgrade/release-3.4.x.asciidoc
index 6f7ef11..1916da8 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -64,7 +64,6 @@ gremlin> g.V().group().
 ......1>   by(label).
 ......2>   by(outE().values("weight").sum())
 ==>[person:3.5]
-gremlin> 
 gremlin> g.V().group().
 ......1>   by(label).
 ......2>   by(coalesce(outE().values("weight"), constant(0)).sum())
@@ -73,3 +72,45 @@ gremlin> g.V().group().
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1777[TINKERPOP-1777]
 
+==== 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.
+
+The following snippets illustrate the changed behavior:
+
+[source,groovy]
+----
+gremlin> g.V(1).
+......1>   group("a").
+......2>     by(__.constant("a")).
+......3>     by(__.values("name")).
+......4>   select("a")
+==>[a:marko]
+gremlin> g.V(1).
+......1>   group("a").
+......2>     by(__.constant("a")).
+......3>     by(__.values("name")).
+......4>   select("a").select("a")
+==>[a:marko]
+----
+
+Above is the old behavior; the second `select("a")` has no effect, it selects 
the side-effect `a` again, although one would expect to get the map entry `a`. 
What follows is the new behavior:
+
+[source,groovy]
+----
+gremlin> g.V(1).
+......1>   group("a").
+......2>     by(__.constant("a")).
+......3>     by(__.values("name")).
+......4>   select("a")
+==>[a:marko]
+gremlin> g.V(1).
+......1>   group("a").
+......2>     by(__.constant("a")).
+......3>     by(__.values("name")).
+......4>   select("a").select("a")
+==>marko
+----
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1522[TINKERPOP-1522]

Reply via email to