New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sqlg query with union and tree combination returns wrong vertices #359
Comments
A simpler test
Looks like the VertexStep on B don't get labels, so we don't generate output for them... |
Thanks, master branch is finally passing all TinkerPop tests again, so I'll get time to look at this one soon. |
Ok started on this one. Sqlg does not currently optimize the |
@dkarthikeyan88 I added your test in TestUnion. Your test still actually fails but just because the order of the map is slightly different. |
Sqlg query with union and tree combination returns incorrect vertices after upgrading to 2.0.2-SNAPSHOT. I've created the vertices for the below graph and associated the edges for all the vertices appropriately.
When I run the below query, I get incorrect vertices(some vertices are missing) with the latest master code.
g.traversal().V().has("public.Cluster","name","Test Cluster")
.out("has_Service").has("name","Test Service")
.out("has_Database").has("name","Test DB")
.union(
out("has_Schema").has("name",P.eq("Test Schema1")).out("has_Table").has("name",P.without("Table2")),
out("has_Schema").has("name",P.eq("Test Schema1")).out("has_Table").has("name",P.within("Table1")),
out("has_Schema").has("name",P.eq("Test Schema2")).out("has_Table").has("name",P.neq("Table4")))
.out("has_Column")
.range(0, 100).tree();
Expected result: "{Test Cluster={Test Service={Test DB={Test Schema1={Table1={Column1={}, Column2={}}}, Test Schema2={Table3={Column5={}, Column6={}}}}}}}";
Actual result: "{Test Cluster={Test Service={Test DB={Table3={Column5={}, Column6={}}, Table1={Column1={}, Column2={}}}}}}"
This works properly with 2.0.1 version though. I've added a simple test to validate the sqlg query at https://github.com/dkarthikeyan88/sqlg-version-testing/ for versions 2.0.2-SNAPSHOT and 2.0.1.
Please check if this is issue really an issue and let me know if any other information is required. Thank you!!
The text was updated successfully, but these errors were encountered: