tkalkirill commented on code in PR #5238:
URL: https://github.com/apache/calcite/pull/5238#discussion_r3923396755
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -1904,9 +1904,12 @@ && requireNonNull(((SqlNumericLiteral)
node).bigDecimalValue())
if (orderBy.query instanceof SqlSelect) {
SqlSelect select = (SqlSelect) orderBy.query;
- // Don't clobber existing ORDER BY. It may be needed for
- // an order-sensitive function like RANK.
- if (select.getOrderList() == null) {
+ // Don't clobber existing ORDER BY, OFFSET, or FETCH. ORDER BY may be
+ // needed for an order-sensitive function like RANK; OFFSET and FETCH
+ // establish a separate pagination level.
Review Comment:
Got it, tried to fix it.
--
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]