JiajunBernoulli commented on code in PR #2763:
URL: https://github.com/apache/calcite/pull/2763#discussion_r847850008


##########
core/src/main/java/org/apache/calcite/tools/RelBuilder.java:
##########
@@ -3196,12 +3197,40 @@ public RelBuilder sort(RelCollation collation) {
    */
   public RelBuilder sortLimit(int offset, int fetch,
       Iterable<? extends RexNode> nodes) {
+    final @Nullable RexNode offsetNode = offset <= 0 ? null : literal(offset);
+    final @Nullable RexNode fetchNode = fetch < 0 ? null : literal(fetch);
+    if (offsetNode == null && fetch == 0 && config.simplifyLimit()) {

Review Comment:
   Never mind, I deleted the duplicate code. Thank you again~



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