[ 
https://issues.apache.org/jira/browse/TINKERPOP-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125586#comment-15125586
 ] 

Marko A. Rodriguez commented on TINKERPOP-968:
----------------------------------------------

I now know why {{optional}} no longer exists. Cause we have both {{coalesce}} 
and {{union}} which can simulate either semantic representation of {{optional}}.

{code}
g.V().union(out(),identity()).values("name") // do both
g.V().coalesce(out(),identity()).values("name") // if the first doesn't work, 
do the second
{code}

If this isn't sufficient for what you are trying to do, please argue, else 
close this ticket.

> 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)

Reply via email to