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.


---

Reply via email to