This is an automated email from the ASF dual-hosted git repository. dkuppitz pushed a commit to branch TINKERPOP-1084 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 165efa250ad589e2690601c560a8f69eafcfbb0c Author: Daniel Kuppitz <daniel_kupp...@hotmail.com> AuthorDate: Mon Jun 17 14:37:42 2019 -0700 updated upgrade docs --- docs/src/upgrade/release-3.3.x.asciidoc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc index 51da497..d0fdfb4 100644 --- a/docs/src/upgrade/release-3.3.x.asciidoc +++ b/docs/src/upgrade/release-3.3.x.asciidoc @@ -27,6 +27,36 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima Please see the link:https://github.com/apache/tinkerpop/blob/3.3.8/CHANGELOG.asciidoc#release-3-3-8[changelog] for a complete list of all the modifications that are part of this release. +== Upgrading for Users + +==== Branch Steps accept Predicates and Traversals + +Prior to this version, branch steps (in particular `BranchStep` and `ChooseStep`) could only handle constant values and `Pick` tokens. Starting in this version, these steps will also accept +predicates and traversals as show in the example below. + +[source,text] +---- +gremlin> g = TinkerFactory.createModern().traversal() +==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard] +gremlin> g.V().hasLabel("person"). +......1> group(). +......2> by("name"). +......3> by(branch(values("age")). +......4> option(29, constant("almost old")). +......5> option(__.is(32), constant("looks like josh")). +......6> option(lt(29), constant("pretty young")). +......7> option(lt(35), constant("younger than peter")). +......8> option(gte(30), constant("pretty old")). +......9> option(none, constant("mysterious")).fold()). +.....10> unfold() +==>peter=[pretty old] +==>vadas=[pretty young, younger than peter] +==>josh=[looks like josh, younger than peter, pretty old] +==>marko=[almost old, younger than peter] +---- + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1084[TINKERPOP-1084] + == TinkerPop 3.3.7