stephen mallette created TINKERPOP-1684:
-------------------------------------------

             Summary: Improper results with union() in a by()
                 Key: TINKERPOP-1684
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1684
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.4
            Reporter: stephen mallette


There are some odd results when using a {{union()}} inside a {{by()}}. These 
problems were initially found in {{tree().by()}} as follows:

{code}
gremlin> g.V(1).repeat(out()).emit().tree().next()
==>v[1]={v[2]={}, v[3]={}, v[4]={v[3]={}, v[5]={}}}
gremlin> g.V(1).repeat(out()).emit().tree().by('name').next()
==>marko={vadas={}, josh={ripple={}, lop={}}, lop={}}
gremlin> 
g.V(1).repeat(out()).emit().tree().by(union(__(),repeat(out()).emit().count()).fold()).next()
==>[0, v[1], 5]={[0, v[4], 2]={[0, v[5]]={}}}
==>[v[1], 5]={[0, v[2]]={}, [0, v[3]]={}, [0, v[4], 2]={[0, v[3]]={}}}
{code}

For some reason the final traversal returns two entries to tree where there are 
extra "0" values in the lists that we can't seem to account for. So, i suppose 
this is either a bug or we need some explanation for why the extra zeroes are 
there. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to