peng128 commented on code in PR #3057:
URL: https://github.com/apache/calcite/pull/3057#discussion_r1113850428
##########
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:
There are three test cases failure.
1. LatticeTest#testSum
2. LatticeSuggesterTest#testFoodMartAll
3. LatticeSuggesterTest#testFoodMartAllEvolve
Case 1 is caused by this PR. Maybe we could fix in this PR?
Case 2 & 3 is not caused by this PR. I think we could fix case 2 & 3 in
[CALCITE-5537](https://issues.apache.org/jira/browse/CALCITE-5537).
BTW, these code just fix case 1.
--
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]