This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 465c9fe20172 [SPARK-61406][SQL] Enable
`spark.sql.optimizer.datasourceV2JoinPushdown` in tests
465c9fe20172 is described below
commit 465c9fe20172f058060c3f2d35afdf389308f26a
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Nov 10 21:00:48 2026 -0800
[SPARK-61406][SQL] Enable `spark.sql.optimizer.datasourceV2JoinPushdown` in
tests
### What changes were proposed in this pull request?
This PR aims to enable `spark.sql.optimizer.datasourceV2JoinPushdown` in
tests by changing its default value from `false` to `Utils.isTesting`. The
default value stays `false` outside of tests.
### Why are the changes needed?
DSv2 join pushdown has been available since [Apache Spark 4.1.0
(2025-12-11)](https://github.com/apache/spark/releases/tag/v4.1.0) via
SPARK-52187. Currently, only the JDBC data source implements
`SupportsPushDownJoin`, for the H2, PostgreSQL, MySQL, SQL Server and Oracle
dialects.
Since this configuration is disabled by default, the join pushdown code
path runs only in the test cases that enable it explicitly. SPARK-59710 fixed a
wrong `AVG` result and a failure with `partitionColumn` only recently. With
this PR, every test that joins two tables of the same JDBC catalog runs the
join pushdown code path. This gives the feature more test coverage before we
consider enabling it by default.
### Does this PR introduce _any_ user-facing change?
No. The default value remains `false` outside of tests.
### How was this patch tested?
Pass the CIs.
In addition, the following JDBC and DSv2 test suites (45 suites, 1,660
tests) passed locally with this configuration enabled.
```
$ build/sbt 'sql/testOnly org.apache.spark.sql.jdbc.*
org.apache.spark.sql.execution.datasources.v2.*
org.apache.spark.sql.connector.DataSourceV2Suite
org.apache.spark.sql.connector.DataSourceV2TableSampleSuite
org.apache.spark.sql.connector.DataSourceV2SQLSuite*'
...
[info] Tests: succeeded 1660, failed 0, canceled 77, ignored 2, pending 0
[info] All tests passed.
```
The Docker integration suites (`*JoinPushdownIntegrationSuite`) already
enable this configuration explicitly.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
Closes #60312 from dongjoon-hyun/SPARK-61406.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
skip-checks: true
---
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
index 111d68fec6a2..ca3505056fd2 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
@@ -2623,7 +2623,7 @@ object SQLConf {
.doc("When this config is set to true, join is tried to be pushed down" +
"for DSv2 data sources in V2ScanRelationPushdown optimization rule.")
.booleanConf
- .createWithDefault(false)
+ .createWithDefault(Utils.isTesting)
// This is used to set the default data source
val DEFAULT_DATA_SOURCE_NAME = buildConf("spark.sql.sources.default")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]