mihaibudiu commented on code in PR #5238:
URL: https://github.com/apache/calcite/pull/5238#discussion_r3926994692


##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -7561,6 +7561,27 @@ public boolean isBangEqualAllowed() {
     sql("select * from emp as e, dept as d order by e.empno").ok();
   }
 
+  @Test void testOrderByPreservesFetchAddedByRewrite() {

Review Comment:
   please add JavaDoc to the new tests indicating which issue is being fixed. 
There are lots of examples in the codebase already, follow the pattern.



##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -15262,6 +15283,36 @@ private static SqlIdentifier 
rewriteIdentifier(SqlIdentifier sqlIdentifier) {
     }
   }
 
+  /** Validator that simulates rewriting a ROWNUM predicate to FETCH. */

Review Comment:
   Ok, then maybe add a comment explaining that this bug only happens for plans 
coming from some other piece of software and not from the Calcite parser.



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