You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nGQL: FIND SHORTEST PATH FROM 933 TO 153931628329323366 OVER * YIELD path as p
Problem: Query the shortest path of two vids and one vid does not exist (for example, in the nGQL shown above, 933 exists and 153931628329323366 does not exist).
In the first loop, vid 933 returns a non-empty set in Getneighbors executor, and vid 153931628329323366 returns an empty set in Getneighbors executor, so it should be able to determine that the shortestpath does not exist. Instead, the loop executor does not stop because of this, it will still loop three times to calculate the second-order and third-order neighbor nodes of vid 933 based on Execution plan, which increases a lot of computational overhead.
Observing the execution plan with profile can find:
For vid 153931628329323366:
For vid 933:
I'm working on it and trying to fix it.
Thanks,
Rulin Huang
The text was updated successfully, but these errors were encountered:
@nevermore3
Thank you for your suggestion.
My general idea is:
Due to each loop, all the other neighbor vids are found for the current vid. Then, it can be judged that if no new neighbor vids are added after the latest loop, it means that the connected graph constructed by leftvid or rightvid has formed a complete divided subgraph, and there is no shortest path between leftvid and rightvid.
The judgment condition that needs to be added is to judge whether there are new neighbor vids joining the left and right vids after a loop, and if not, end the loop.
This method is effective not only for the non-existing vid, but also for the divided subgraph when judging whether the loop should end.
Does it mean to modify singlePairPlan and singlePairLoopCondition in src\graph\planner\ngql\PathPlanner.cpp? Get the conditions that need to be judged from the ObjctPool?
Dataset: Nebula-Bench LDBC-SNB benchmark
nGQL: FIND SHORTEST PATH FROM 933 TO 153931628329323366 OVER * YIELD path as p
Problem: Query the shortest path of two vids and one vid does not exist (for example, in the nGQL shown above, 933 exists and 153931628329323366 does not exist).
In the first loop, vid 933 returns a non-empty set in Getneighbors executor, and vid 153931628329323366 returns an empty set in Getneighbors executor, so it should be able to determine that the shortestpath does not exist. Instead, the loop executor does not stop because of this, it will still loop three times to calculate the second-order and third-order neighbor nodes of vid 933 based on Execution plan, which increases a lot of computational overhead.
Observing the execution plan with profile can find:
For vid 153931628329323366:
For vid 933:
I'm working on it and trying to fix it.
Thanks,
Rulin Huang
The text was updated successfully, but these errors were encountered: