cloud-fan commented on code in PR #36295: URL: https://github.com/apache/spark/pull/36295#discussion_r873511627
########## sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/ScanBuilder.java: ########## @@ -23,7 +23,7 @@ * An interface for building the {@link Scan}. Implementations can mixin SupportsPushDownXYZ * interfaces to do operator push down, and keep the operator push down result in the returned * {@link Scan}. When pushing down operators, the push down order is: - * sample -> filter -> aggregate -> limit -> column pruning. + * sample -> filter -> aggregate -> offset -> limit or top N -> column pruning. Review Comment: top n is a bit tricky as it's sort + limit. how about `aggregate -> limit/top-n(sort + limit) -> offset`? the order of limit and offset doesn't matter as we can always switch the order and adjust the value. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org