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

Daniel Kuppitz commented on TINKERPOP3-549:
-------------------------------------------

Both variants are working now:

{noformat}
gremlin> 
g.V(1).repeat(out().as("a")).until(label().is("software")).emit().in("created").select("a").path().by
 {it instanceof ArrayList ? it*.value("name") : it.value("name")}
==>[marko, lop, marko, lop]
==>[marko, lop, josh, lop]
==>[marko, lop, peter, lop]
==>[marko, josh, ripple, josh, [josh, ripple]]
==>[marko, josh, lop, marko, [josh, lop]]
==>[marko, josh, lop, josh, [josh, lop]]
==>[marko, josh, lop, peter, [josh, lop]]
{noformat}

{noformat}
gremlin> 
g.V(1).repeat(out().as("a")).until(label().is("software")).emit().in("created").select("a").path().by(branch
 {it.get().getClass()}.option(ArrayList.class, 
unfold().values("name").fold()).option(none, values("name")))
==>[marko, lop, marko, lop]
==>[marko, lop, josh, lop]
==>[marko, lop, peter, lop]
==>[marko, josh, ripple, josh, [josh, ripple]]
==>[marko, josh, lop, marko, [josh, lop]]
==>[marko, josh, lop, josh, [josh, lop]]
==>[marko, josh, lop, peter, [josh, lop]]
{noformat}

Would be nice to have {{.banch(byType)}}, but that's another issue.

> Path data structure
> -------------------
>
>                 Key: TINKERPOP3-549
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-549
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: process
>            Reporter: Daniel Kuppitz
>             Fix For: 3.0.0.GA
>
>
> Cover the sample(s) in [Path Data 
> Structure|http://www.tinkerpop.com/docs/3.0.0-SNAPSHOT/#path-data-structure] 
> with unit tests. At the moment there's nothing that prevents one from 
> removing the List-logic in 
> [Path::get()|https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-core/src/main/java/com/tinkerpop/gremlin/process/Path.java#L50-L71].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to