cloud-fan commented on code in PR #39954:
URL: https://github.com/apache/spark/pull/39954#discussion_r1114255805
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala:
##########
@@ -126,24 +126,23 @@ case class JDBCScanBuilder(
upperBound: Double,
withReplacement: Boolean,
seed: Long): Boolean = {
- if (jdbcOptions.pushDownTableSample &&
- JdbcDialects.get(jdbcOptions.url).supportsTableSample) {
+ if (jdbcOptions.pushDownTableSample && dialect.supportsTableSample) {
Review Comment:
shall we make two more changes?
1. remove the JDBC option for pushdown (false by default AFAIK)
2. jdbc dialect should return false in these new pushdown APIs, to keep the
old false by default behavior.
3. override the pushdown APIs in builtin dialects if we have tests for them.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala:
##########
@@ -126,24 +126,23 @@ case class JDBCScanBuilder(
upperBound: Double,
withReplacement: Boolean,
seed: Long): Boolean = {
- if (jdbcOptions.pushDownTableSample &&
- JdbcDialects.get(jdbcOptions.url).supportsTableSample) {
+ if (jdbcOptions.pushDownTableSample && dialect.supportsTableSample) {
Review Comment:
shall we make a few more changes?
1. remove the JDBC option for pushdown (false by default AFAIK)
2. jdbc dialect should return false in these new pushdown APIs, to keep the
old false by default behavior.
3. override the pushdown APIs in builtin dialects if we have tests for them.
--
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]