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


##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -10407,4 +10407,30 @@ private void 
checkLoptOptimizeJoinRule(LoptOptimizeJoinRule rule) {
         .withRule(CoreRules.JOIN_CONDITION_PUSH)
         .check();
   }
+
+  /** Test case of
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-6973";>[CALCITE-6973]
+   * Add rule for convert Minus to Filter</a>. */
+  @Test void testMinusToFilterRule() {
+    final String sql = "SELECT mgr, comm FROM emp WHERE mgr = 12\n"
+        + "EXCEPT\n"
+        + "SELECT mgr, comm FROM emp WHERE comm = 5\n";
+    sql(sql)
+        .withPreRule(CoreRules.PROJECT_FILTER_TRANSPOSE)
+        .withRule(CoreRules.MINUS_TO_FILTER)
+        .check();
+  }
+

Review Comment:
   In my opinion, it may not be necessary to add this case. This case may only 
show whether the filter is merged, which has little to do with this PR.



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