Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.3.0
-
None
-
None
Description
The following query transforms the modern graph into layers:
gremlin> g.V(1).aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup(). ......1> aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup(). ......2> aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup(). ......3> cap("x").next() ==>[v[1]] ==>[v[3],v[2],v[4]] ==>[v[6],v[5]]
The index of each list represents the minimum distance of the vertices it contains from v[1].
There's obviously a lot of code duplication, but even worse: the max. depth has to be known upfront. repeat() could solve that, but currently fails if it contains a reducing barrier step (in OLTP and OLAP).
gremlin> g.V(1).repeat(aggregate("a").fold().store("x").unfold().both().where(without("a")).dedup()).cap("x").next() The parent of a reducing barrier can not be repeat()-step: FoldStep