hsyuan commented on a change in pull request #1966:
URL: https://github.com/apache/calcite/pull/1966#discussion_r422663874



##########
File path: 
core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
##########
@@ -717,9 +718,10 @@ public RelOptCost getCost(RelNode rel, RelMetadataQuery 
mq) {
   public RelSubset getSubset(RelNode rel) {
     assert rel != null : "pre: rel != null";
     if (rel instanceof RelSubset) {
-      return (RelSubset) rel;
+      return canonize((RelSubset) rel);
     } else {
-      return mapRel2Subset.get(rel);
+      RelSubset s = mapRel2Subset.get(rel);
+      return s == null ? null : canonize(s);

Review comment:
       IMO, canonize in this method is not needed. It should only be canonized 
when the subset is created. What do you think?




----------------------------------------------------------------
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:
[email protected]


Reply via email to