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



##########
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:
       @liyafan82 I am not saying getPaths() to return shortest paths. What I 
mean is you should put shortest path at the front of list, so during convert() 
we always choose the shortest converted path if possible. This only requires a 
sort after generating all possible path.
   
   @rubenada I don't think we need to cache shortest path. This is only one 
time used and there's no benefit to cache it.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to