andreachild commented on code in PR #3244:
URL: https://github.com/apache/tinkerpop/pull/3244#discussion_r2446217391


##########
docs/src/upgrade/release-3.8.x.asciidoc:
##########
@@ -623,6 +623,43 @@ gremlin> g.V().choose(__.values("age")).
 ==>peter
 ----
 
+*Removal of choose().option(Traversal, v)*
+
+The `choose().option(Traversal, v)` was relatively unused in comparison to the 
other overloads with constants, predicates
+and Pick tokens. The previous implementation often led to confusion as it only 
evaluated if the traversal was productive,
+rather than performing comparisons based on the traversal's output value. To 
eliminate this confusion, `Traversal` is no
+longer permitted as an option token for `choose()`. Any usages which are 
dependent on the Traversal for dynamic case
+matching can be rewritten using `union()`, with filters prepended to each 
child traversal.
+
+[source,text]
+----
+// 3.7.x
+gremlin> g.V().hasLabel("person").choose(identity()).
+......1>         option(outE().count().is(P.gt(2)), values("age")).
+......2>         option(none, values("name"))
+==>29
+==>vadas
+==>josh
+==>peter

Review Comment:
   Can you explain what is confusing about this example?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to