[ https://issues.apache.org/jira/browse/TINKERPOP-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15126856#comment-15126856 ]
pieter martin commented on TINKERPOP-968: ----------------------------------------- Ok great, The {{coalesce}} indeed does what I am looking for. All that remains is whether its a good idea to add the {{optional}} keyword anyways and compile that to a {{coalesce}} I would argue that it is worth it as I certainly have read the {{coalesce}} docs before without understanding it. Considering the TinkerPop crew also forgot that {{coalesce}} together with {{identity}} is equivalent to {{optional}} perhaps it would make life easier if {{optional}} gets first class status? Its also somewhat shorter as there would be no need for the {{identity}} traversal. Thanks Pieter > 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 > > 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)