You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/06/17 12:49:16 UTC

[GitHub] [calcite] liyafan82 commented on a change in pull request #2027: [CALCITE-4049] Improve the implementation of the shortest-path algorithm

liyafan82 commented on a change in pull request #2027:
URL: https://github.com/apache/calcite/pull/2027#discussion_r441518399



##########
File path: core/src/main/java/org/apache/calcite/plan/ConventionTraitDef.java
##########
@@ -234,10 +234,10 @@ private ConversionData getConversionData(RelOptPlanner planner) {
       return pathMap;
     }
 
-    public List<Convention> getShortestPath(
+    public int getShortestDistance(

Review comment:
       IMO, it would be an overkill to call getPaths() only to get the shortest path. 
   To support this scenario, I have restored the getShortestPath API, and implement it with BFS. It should be more efficient than the Dijkstra and Floyd algorihtms. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org