[SPARK-56585][SQL][TESTS] Replace SparkPlanTest with QueryTest#55496
Closed
zhengruifeng wants to merge 1 commit into
Closed
[SPARK-56585][SQL][TESTS] Replace SparkPlanTest with QueryTest#55496zhengruifeng wants to merge 1 commit into
zhengruifeng wants to merge 1 commit into
Conversation
### What changes were proposed in this pull request?
Followup to SPARK-56563. Migrate all call sites from the empty alias
`SparkPlanTest` (in `org.apache.spark.sql.execution`) to `QueryTest`
(in `org.apache.spark.sql`). The deprecated alias `SparkPlanTest` is
left in place for downstream compatibility.
Mechanical changes across 13 files:
- `extends SparkPlanTest with SharedSparkSession` -> `extends SharedSparkSession`
(dropping duplicate — `SharedSparkSession` already extends `QueryTest`)
- `extends SparkPlanTest with QueryTest` -> `extends QueryTest`
(dropping duplicate)
- `SparkPlanTest.executePlan` -> `QueryTest.executePlan`
- Removed `SparkPlanTest` from `org.apache.spark.sql.execution.{...}`
import lines
### Why are the changes needed?
Finishes the consolidation started in SPARK-56563 by migrating every
in-tree caller to the canonical `QueryTest` in `org.apache.spark.sql`,
so in-tree callers no longer trigger the deprecation warning on
`SparkPlanTest`.
### Does this PR introduce _any_ user-facing change?
No, test-only.
### How was this patch tested?
Locally compiled `sql/Test/compile` and `hive/Test/compile` successfully.
Ran `SingleJoinSuite` (36 tests), `ExchangeSuite` and
`ReuseExchangeAndSubquerySuite` (10 tests total) — all pass. Relying on
CI for full test run.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7
HyukjinKwon
approved these changes
Apr 23, 2026
Contributor
Author
|
merged to master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Followup to SPARK-56563. Migrate every in-tree caller from the empty alias
SparkPlanTest(inorg.apache.spark.sql.execution, deprecated) toQueryTest(inorg.apache.spark.sql).SparkPlanTest.scalaitself is left untouched — the deprecatedtrait/objectaliases remain in place for downstream compatibility.Mechanical changes across 13 files:
extendslist — droppedSparkPlanTestfrom the parent list. SinceSharedSparkSessionandQueryTestalready extendQueryTest(directly or transitively), the formerSparkPlanTestreference was a pure duplicate:ReuseExchangeAndSubquerySuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionSortSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionExchangeSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionBroadcastExchangeSuiteextends SparkPlanTest with SharedSparkSession with AdaptiveSparkPlanHelperextends SharedSparkSession with AdaptiveSparkPlanHelperTakeOrderedAndProjectSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionBaseScriptTransformationSuiteextends SparkPlanTest with QueryTestextends QueryTestExtractPythonUDFsSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionBatchEvalPythonExecSuiteextends SparkPlanTest with SharedSparkSession with AdaptiveSparkPlanHelperextends SharedSparkSession with AdaptiveSparkPlanHelperSingleJoinSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionInnerJoinSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionOuterJoinSuiteextends SparkPlanTest with SharedSparkSession with SQLTestDataextends SharedSparkSession with SQLTestDataExistenceJoinSuiteextends SparkPlanTest with SharedSparkSessionextends SharedSparkSessionStatic calls —
SparkPlanTest.executePlan->QueryTest.executePlanin:BaseScriptTransformationSuiteSingleJoinSuiteHiveScriptTransformationSuite(4 call sites)Imports — removed
SparkPlanTestfrom theorg.apache.spark.sql.execution.{...}import lines inBatchEvalPythonExecSuite,ExtractPythonUDFsSuite,ExistenceJoinSuite,OuterJoinSuite,SingleJoinSuite. Addedimport org.apache.spark.sql.QueryTesttoSingleJoinSuiteandHiveScriptTransformationSuitefor the static-method calls.Why are the changes needed?
Finishes the consolidation started in SPARK-56563 by migrating every in-tree caller to the canonical
QueryTestinorg.apache.spark.sql, so in-tree callers no longer trigger the deprecation warning onSparkPlanTest. The deprecated alias is still available for any downstream users.Does this PR introduce any user-facing change?
No, test-only.
How was this patch tested?
Locally compiled
sql/Test/compileandhive/Test/compilesuccessfully. RanSingleJoinSuite(36 tests),ExchangeSuite+ReuseExchangeAndSubquerySuite(10 tests total) — all pass. Relying on CI for full test run.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7