cloud-fan commented on code in PR #36295:
URL: https://github.com/apache/spark/pull/36295#discussion_r902304551
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala:
##########
@@ -139,6 +142,25 @@ case class JDBCScanBuilder(
false
}
+ override def pushOffset(offset: Int): Boolean = {
+ if (jdbcOptions.pushDownOffset && !isPartiallyPushed) {
+ // We pushing down offset when data source have only one partition.
+ // There are some push down path.
Review Comment:
We can make the comment much simpler:
```
Spark pushes down LIMIT first, then OFFSET. In SQL statements, OFFSET is
applied before
LIMIT. Here we need to adjust the LIMIT value to match SQL statements.
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]