xiedeyantu commented on code in PR #4301:
URL: https://github.com/apache/calcite/pull/4301#discussion_r2044312543


##########
testkit/src/main/java/org/apache/calcite/test/QuidemTest.java:
##########
@@ -171,6 +182,33 @@ protected void checkRun(String path) throws Exception {
               int thresholdValue = ((BigDecimal) value).intValue();
               
closer.add(Prepare.THREAD_INSUBQUERY_THRESHOLD.push(thresholdValue));
             }
+            if (propertyName.equals("rules")) {
+              parseRules((String) value);
+              closer.add(
+                  Hook.PLANNER.addThread((Consumer<RelOptPlanner>)
+                      planner -> {
+                          for (RelOptRule rule : addRulesCache) {
+                            planner.addRule(rule);
+                          }
+                          for (RelOptRule rule : removeRulesCache) {
+                            planner.removeRule(rule);
+                          }
+                      }));
+            }
+            if (propertyName.equals("reset-rules")) {

Review Comment:
   Sorry, I have been thinking for a long time and I don't have a good way. In 
my opinion, the internal logic is to set the original rule set back when it is 
reset. If it is not set back, then test3 should not have intersect. I can 
easily verify this problem by logging locally. But I can't think of a good way 
to write the test.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to