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


##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -11336,6 +11336,17 @@ private void 
checkLoptOptimizeJoinRule(LoptOptimizeJoinRule rule) {
         .check();
   }
 
+  /** Test case of
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7222";>[CALCITE-7222]
+   * SortRemoveDuplicateKeysRule miss fetch and offset infomation</a>. */
+  @Test void testSortRemoveDuplicateKeysWithLimit() {
+    final String query = "select * from (select empno as a, deptno as b from 
emp) t"

Review Comment:
   @iwanttobepowerful This is because `empno` is the primary key, so `deptno` 
can be eliminated. Here, we're focusing on fixing the missing `limit` and 
`offset` issues, which are actually fine. I've also added the test case you 
mentioned. Please check if you still have any issues.



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