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

stephen mallette commented on TINKERPOP-1684:
---------------------------------------------

This issue could have some relation to TINKERPOP-1693 as the use of {{tree()}} 
with {{by()}} seems to open up the chance for bad stuff to happen.

> 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.4.14#64029)

Reply via email to