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



##########
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:
       Hi @danny0405 , sorry for the late reply. We found this case in our 
product env and it been so long that I can not find the origin case 😂, I'll try 
again.
   By the performance, we had monitor, it does not increase the planning time.




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