beliefer commented on code in PR #36405:
URL: https://github.com/apache/spark/pull/36405#discussion_r863326711
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala:
##########
@@ -131,7 +131,8 @@ case class JDBCScanBuilder(
}
override def pushLimit(limit: Int): Boolean = {
- if (jdbcOptions.pushDownLimit) {
+ if (jdbcOptions.pushDownLimit &&
+ JdbcDialects.get(jdbcOptions.url).canPushDownLimit(jdbcOptions, limit)) {
Review Comment:
This option just used to solve out-of-memory when `Limit` could be pushed
down. Because all the data will pulled by one Task when pushing down `Limit`.
If Limit cannot be pushed down, Spark could uses jdbc partition or other method
to avoid the problem.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala:
##########
@@ -131,7 +131,8 @@ case class JDBCScanBuilder(
}
override def pushLimit(limit: Int): Boolean = {
- if (jdbcOptions.pushDownLimit) {
+ if (jdbcOptions.pushDownLimit &&
+ JdbcDialects.get(jdbcOptions.url).canPushDownLimit(jdbcOptions, limit)) {
Review Comment:
This option just used to solve out-of-memory when `Limit` could be pushed
down. Because all the data will pulled by one Task when pushing down `Limit`.
If `Limit` cannot be pushed down, Spark could uses jdbc partition or other
method to avoid the problem.
--
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]