[ https://issues.apache.org/jira/browse/TINKERPOP-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213120#comment-15213120 ]
ASF GitHub Bot commented on TINKERPOP-968: ------------------------------------------ GitHub user pietermartin opened a pull request: https://github.com/apache/incubator-tinkerpop/pull/279 Tinkerpop 968:Add first class support for an optional traversal https://issues.apache.org/jira/browse/TINKERPOP-968 Added `optional(Traversal)` to `GraphTraversal`. Optional semantics is implemented via the `choose` step. Added `OptionalTest.java` Added `Optional`-step documentation. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-968 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-tinkerpop/pull/279.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #279 ---- commit 427c3327988d83970d3191c552357d4805d01e61 Author: pieter <pieter.mar...@gmail.com> Date: 2016-03-25T15:26:45Z added optional to GraphTraversal commit 2652bc2516b5408015c8daf30ac69964e3dc0dd2 Author: pieter <pieter.mar...@gmail.com> Date: 2016-03-25T15:58:00Z Merge branch 'master' into TINKERPOP-968 commit edc9d68234873a56bb148bd958f410d845f339de Author: pieter <pieter.mar...@gmail.com> Date: 2016-03-25T17:17:30Z Merge branch 'master' into TINKERPOP-968 commit 0b6c0f41565cfc3578ca6c64447c536c4148fb4a Author: pieter <pieter.mar...@gmail.com> Date: 2016-03-26T16:54:04Z Merge branch 'master' into TINKERPOP-968 ---- > Add first class support for an optional traversal > ------------------------------------------------- > > Key: TINKERPOP-968 > URL: https://issues.apache.org/jira/browse/TINKERPOP-968 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.1.0-incubating > Reporter: pieter martin > Assignee: pieter martin > > Both SparQL and Cypher use the "Optional" keyword to indicate an optional > traversal. SQL uses the "left join". > Gremlin has no first class support for an optional traversal. It can be > achieved with the choose step but it is verbose, unintuitive and not what the > choose step is intended for. > The benefits of optional traversals are many. In particular it makes it > trivial to load complete subgraphs/trees with one easy to read intuitive > gremlin statement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)