[SPARK-56560][SQL][TESTS] Replace SQLTestUtils/SQLTestUtilsBase with QueryTest/QueryTestBase#55445
Closed
zhengruifeng wants to merge 4 commits into
Closed
Conversation
…Base with QueryTest/QueryTestBase
Followup to SPARK-55910. Migrate all call sites from the empty alias traits `SQLTestUtils`/`SQLTestUtilsBase` and the `SQLTestUtils.compareAnswers` alias to `QueryTest`/`QueryTestBase` and `QueryTest.compareAnswers` directly, and delete the alias file `sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala`.
Mechanical changes across 68 files:
- `extends/with SQLTestUtils` -> `extends/with QueryTest` (and dropped duplicates when `QueryTest` was already in the parent list)
- `extends/with SQLTestUtilsBase` -> `extends/with QueryTestBase`
- `SQLTestUtils.compareAnswers` -> `QueryTest.compareAnswers`
- Import lines rewritten to `org.apache.spark.sql.{QueryTest,QueryTestBase}` (different package from the old aliases)
- Updated two stale `SQLTestUtils`/`SQLTestUtilsBase` mentions in code comments
Finishes the consolidation started in SPARK-55910 by removing the now-empty alias trait/object and having all test suites reference the canonical `QueryTest`/`QueryTestBase` in `org.apache.spark.sql`.
No, test-only.
Compiled `sql/Test/compile`, `hive/Test/compile`, `protobuf/Test/compile`, and `pipelines/Test/compile` successfully.
Generated-by: Claude Opus 4.7
5725604 to
f130b05
Compare
HyukjinKwon
approved these changes
Apr 21, 2026
Member
|
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-55910. Migrate all call sites from the empty alias traits
SQLTestUtils/SQLTestUtilsBaseand theSQLTestUtils.compareAnswersalias toQueryTest/QueryTestBaseandQueryTest.compareAnswersdirectly, and mark the aliases as@deprecated(scheduled for removal after downstream usages migrate).Mechanical changes across 68 files:
extends/with SQLTestUtils->extends/with QueryTest(dropped duplicate whenQueryTestwas already in the parent list)extends/with SQLTestUtilsBase->extends/with QueryTestBaseSQLTestUtils.compareAnswers->QueryTest.compareAnswersorg.apache.spark.sql.{QueryTest, QueryTestBase}(different package from the old aliases)SQLTestUtils/SQLTestUtilsBasementions in code commentsIn
sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala:@deprecated("Use QueryTest directly instead.", "4.2.0")ontrait SQLTestUtilsandobject SQLTestUtils@deprecated("Use QueryTestBase directly instead.", "4.2.0")ontrait SQLTestUtilsBasecompareAnswersdelegate remain in place for backward compatibility.Why are the changes needed?
Finishes the consolidation started in SPARK-55910 by migrating every in-tree caller to the canonical
QueryTest/QueryTestBaseinorg.apache.spark.sql, and flagging the aliases so any remaining (or downstream) users get a compile-time deprecation warning.Does this PR introduce any user-facing change?
No, test-only.
How was this patch tested?
Locally compiled
sql/Test/compile,hive/Test/compile,protobuf/Test/compile, andpipelines/Test/compilesuccessfully. Relying on CI for full test run.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7