JiajunBernoulli commented on code in PR #3085:
URL: https://github.com/apache/calcite/pull/3085#discussion_r1181317664
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1791,6 +1791,14 @@ private boolean needNewSubQuery(
return false;
}
final Clause maxClause = Collections.max(clauses);
+
+ 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:
Agree, we should `return true` avoid `return false` blocking other
conditions.
--
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]