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