Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.4.12
-
None
-
None
Description
Using air routes dataset, you get some odd output if you `union(...).fold()` in the second `by()` and if the children to `union()` are reducing steps:
gremlin> g.V().hasLabel('airport').has('country','TZ'). ......1> group(). ......2> by('country'). ......3> by(union(values('elev').min(), values('elev').max()).fold()). ......4> unfold() ==>TZ=[3745, 3745, 2932, 2932, 3763, 3763, 371, 371, 5600, 5600, 4550, 4550, 182, 182, 54, 54]
I was able to workaround it with:
gremlin> g.V().hasLabel('airport').has('country','TZ'). ......1> group(). ......2> by('country'). ......3> by(values('elev').fold().local(union(min(local),max(local))).fold()). ......4> unfold() ==>TZ=[54, 5600]