iampratap7997-dot commented on issue #2935:
URL:
https://github.com/apache/incubator-hugegraph/issues/2935#issuecomment-3813095633
I followed the discussion and analysis already shared in this issue and
verified the behavior by reproducing it with a small, controlled test case on
HugeGraph 1.7.0.
Using a minimal setup, I was able to consistently observe the inconsistency
between the two equivalent Gremlin queries when has() is combined with repeat()
at the top level.
Test data overview:
3 vertices
2 edges
The starting vertex has property vp4 set to an empty value
Gremlin setup :
// Create vertices and edges
v1 = graph.addVertex("vp4", "")
v2 = graph.addVertex()
v3 = graph.addVertex()
v1.addEdge("el2", v2)
v2.addEdge("el2", v3)
// Query using top-level has() with repeat()
g.V().has('vp4', lt('')).repeat(__.out('el2')).emit().times(1).count()
// Result: ArrayIndexOutOfBoundsException
// Equivalent query rewritten using match()
g.V().match(
__.as('start').has('vp4', lt('')),
__.as('start').out('el2').as('m')
).select('m').count()
// Result: returns normally
Findings:
• The exception occurs only when the filter is applied at the top level and
pushed into the backend query.
• When the same logic is expressed using match() (or nested traversal), the
filter is evaluated after data retrieval and the query completes successfully.
• I was not able to reproduce this inconsistency on JanusGraph or vanilla
TinkerPop.
Notes:
• Until this is addressed in HugeGraph, rewriting such traversals using
match() or nested steps appears to be a reliable workaround.
• Adding a small regression test based on this case could help catch similar
planner-related issues in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]