Aaaaaaron commented on a change in pull request #2222:
URL: https://github.com/apache/calcite/pull/2222#discussion_r519524229



##########
File path: 
core/src/main/java/org/apache/calcite/plan/volcano/VolcanoRuleCall.java
##########
@@ -190,7 +190,8 @@ protected void onMatch() {
           return;
         }
 
-        if (subset.set.equivalentSet != null) {
+        if ((subset.set.equivalentSet != null)
+            || (subset != rel && !subset.getRelList().contains(rel))) {

Review comment:
       For the potential performance issue, how about I add a method 
`getRelSet`, the set#contains's performance should be better than list#contain




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