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

ASF GitHub Bot commented on TINKERPOP-1822:
-------------------------------------------

Github user krlohnes commented on the issue:

    https://github.com/apache/tinkerpop/pull/715
  
    @mpollmeier Sure thing! One thing that I've noticed is that currently, 
`emit` doesn't emit in the order  I'd expect for multiple children. e.g. for a 
simple k-ary tree with 4 nodes, though it seems to work with a binary tree. The 
following has `emit` vs `store` + `cap`. `cap` produces the order that I'd 
expect from emit.
    
    ```
    v0 = graph.addVertex().property("level", "0:0").vertex
    v1_0 = graph.addVertex().property("level", "1:0").vertex
    v1_1 = graph.addVertex().property("level", "1:1").vertex
    v1_2 = graph.addVertex().property("level", "1:2").vertex
    v1_3 = graph.addVertex().property("level", "1:3").vertex
    
    v0.addEdge("child", v1_0, "num", 0)
    v0.addEdge("child", v1_1, "num", 1)
    v0.addEdge("child", v1_2, "num", 2)
    v0.addEdge("child", v1_3, "num", 3)
    
    gremlin> g.V().has("level", 
"0:0").repeat(__.out("child").order().by(__.inE("child").values("num"))).emit()
    ==>v[2]
    ==>v[8]
    ==>v[6]
    ==>v[4]
    
    gremlin> g.V().has("level", 
"0:0").repeatDF(__.out("child").order().by(__.inE("child").values("num")).store("res")).cap("res")
    ==>[v[2],v[4],v[6],v[8]]
    ```
    
    I'll look in to it when I have a few minutes, but I figured I'd update here 
in case someone has a thought about it or I'm missing something obvious.


> Repeat should depth first search
> --------------------------------
>
>                 Key: TINKERPOP-1822
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1822
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.3.0, 3.2.6
>            Reporter: Robert Dale
>            Priority: Major
>
> Perhaps optionally.
> See also:
> * https://groups.google.com/forum/#!topic/gremlin-users/gLSLxH_K-wE
> * https://github.com/apache/tinkerpop/pull/715



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to