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

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

spmallette merged PR #3076:
URL: https://github.com/apache/tinkerpop/pull/3076




> having order() before fold() omits an empty list in GroupStep's value 
> traversal
> -------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2971
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2971
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: tinkergraph
>    Affects Versions: 3.6.4
>            Reporter: Norio Akagi
>            Priority: Critical
>
> Using the modern graph,
> {code:java}
> gremlin> g.V().group().by().by(out().fold())
> ==>[v[1]:[v[3],v[2],v[4]],v[2]:[],v[3]:[],v[4]:[v[5],v[3]],v[5]:[],v[6]:[v[3]]]{code}
> {{out().fold()}} produces an empty list when there is no solution for 
> {{out()}} in a value traversal of GroupStep. However if I put {{order()}} 
> those empty lists are gone.
> {code:java}
> gremlin> g.V().group().by().by(out().order().fold())
> ==>[v[1]:[v[2],v[3],v[4]],v[4]:[v[3],v[5]],v[6]:[v[3]]]{code}
> I think this is not an expected behavior. 
> I don't see the similar effect in by() itself
> {code:java}
> gremlin> g.V().as("a").select("a").by(out().fold())
> ==>[v[3],v[2],v[4]]
> ==>[]
> ==>[]
> ==>[v[5],v[3]]
> ==>[]
> ==>[v[3]]{code}
> {code:java}
> gremlin> g.V().as("a").select("a").by(out().order().fold())
> ==>[v[2],v[3],v[4]]
> ==>[]
> ==>[]
> ==>[v[3],v[5]]
> ==>[]
> ==>[v[3]]{code}
> So likely this is GroupStep specific issue. We need to investigate how this 
> occurs and fix if needed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to