Different behaviors when adding "dedup()"

28 views
Skip to first unread message

兰军浩

unread,
Mar 28, 2024, 5:12:12 AMMar 28
to Gremlin-users

I think the traversal is really weird. 

  • first traversal: g.addV().addV().limit(0) -> creates 1 vertex
  • second traversal: g.addV().addV().dedup().limit(0) -> creates 2 vertices

And limit(0) is also strange and I don't really know what the expected behavior should be here with Gremlin.Maybe there is a bug in it?

Florian Hockmann

unread,
Mar 28, 2024, 5:24:47 AMMar 28
to Gremlin-users
This question originated on the JanusGraph issue tracker where it was first reported as a bug in JanusGraph: https://github.com/JanusGraph/janusgraph/issues/4341

I mostly compared the behavior with TinkerGraph to determine whether there's a difference, but both implementations behave the same for these traversals.

The description of these traversals as being weird comes from me, but I mostly meant a more complicated version which includes more steps which didn't make much sense to me. The traversals are probably generated by cypher-for-gremlin.

But I wasn't sure what the expected behavior is with the limit(0), 2x addV() and the added dedup() in the second traversal which is why my advise was to ask this here.
Is it really intended that dedup() changes the outcome here?
Reply all
Reply to author
Forward
0 new messages