Hi all,

I was looking at the ticket,
https://issues.apache.org/jira/browse/TINKERPOP-2863, which reported an
inconsistency between start-step hasId() and mid-traversal hasId().

It looks like this is due to hasId() treating list types (i.e. a
Collection) as a single object and uses P.eq instead of P.within for
comparison. Arrays are, however, unrolled in HasId() to be used with
P.within, and I think this should also be applied to Collections, so I've
implemented the fix here: https://github.com/apache/tinkerpop/pull/2019.

In TinkerGraph, start-step hasId() does not have this issue, because it is
pushed down to the g.V() step, which gets a uniform collection of ids from
the HasContainer and compares each id individually.

However, I just want to note that there has been a side effect with the
unrolling of ids in the start-step hasId(), which is not being able to
filter on any list typed ids, since we unroll all lists. As this fix will
align the mid-traversal hasId() behaviour to the TinkerGraph historical
behaviour, how hasId() handles list typed ids will now be changed slightly
for providers. While I believe unrolling of ids is expected, feel free to
shout out any concerns with this approach.

Best,

Yang
*--*
*Yang Xia*

Reply via email to