libenchao commented on code in PR #3057:
URL: https://github.com/apache/calcite/pull/3057#discussion_r1113822481


##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1809,6 +1816,13 @@ private boolean needNewSubQuery(
         return true;
       }
 
+      if (rel instanceof Project
+          && clauses.contains(Clause.ORDER_BY)
+          && dialect.getConformance().isSortByOrdinal()) {
+        // Cannot merge a Project that contains sort by ordinal under it.
+        return hasSortByOrdinal();
+      }

Review Comment:
   Since we agreed that the slow tests failure is not caused by this PR, we'd 
better handle this in CALCITE-5537.



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