[SPARK-56746][SQL][TESTS] Drop redundant PlanTest/SQLHelper trait mixins#55709
Closed
zhengruifeng wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-56746][SQL][TESTS] Drop redundant PlanTest/SQLHelper trait mixins#55709zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng wants to merge 1 commit intoapache:masterfrom
Conversation
### What changes were proposed in this pull request? Removes a few redundant trait mixins in the test hierarchy: 1. `trait QueryTest extends SparkFunSuite with QueryTestBase with PlanTest` — drop `with PlanTest`. `PlanTest` is `SparkFunSuite with PlanTestBase`, both already in the linearization (`SparkFunSuite` is the first parent; `QueryTestBase` already extends `PlanTestBase`). The mixin contributes nothing. 2. Concrete suites that already inherit `SQLHelper` transitively but redeclared it: - `SqlResourceWithActualMetricsSuite` (via `SharedSparkSession`) - `SparkSessionExtensionSuite` (via `PlanTest`) - `SQLQueryTestSuite` (via `SharedSparkSession`) - `QueryParsingErrorsSuite` (via `SharedSparkSession`) - `ClientE2ETestSuite` (via Connect's `QueryTest`) The now-unused `SQLHelper` imports are also removed. ### Why are the changes needed? Cleanup. Redundant mixins make the trait hierarchy harder to read and signal confusion about where helpers come from. ### Does this PR introduce _any_ user-facing change? No. Test-only refactor. ### How was this patch tested? `build/sbt sql/Test/compile connect-client-jvm/Test/compile` succeeds. No behavior change. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7)
HyukjinKwon
approved these changes
May 6, 2026
zhengruifeng
added a commit
that referenced
this pull request
May 7, 2026
### What changes were proposed in this pull request? Removes a few redundant trait mixins in the test hierarchy: 1. `trait QueryTest extends SparkFunSuite with QueryTestBase with PlanTest` — drop `with PlanTest`. `PlanTest` is `SparkFunSuite with PlanTestBase`, both already in the linearization (`SparkFunSuite` is the first parent; `QueryTestBase` already extends `PlanTestBase`). The mixin contributes nothing. 2. Concrete suites that already inherit `SQLHelper` transitively but redeclared it: - `SqlResourceWithActualMetricsSuite` (via `SharedSparkSession`) - `SparkSessionExtensionSuite` (via `PlanTest`) - `SQLQueryTestSuite` (via `SharedSparkSession`) - `QueryParsingErrorsSuite` (via `SharedSparkSession`) - `ClientE2ETestSuite` (via Connect's `QueryTest`) The now-unused `SQLHelper` imports are also removed. ### Why are the changes needed? Cleanup. Redundant mixins make the trait hierarchy harder to read and signal confusion about where helpers come from. ### Does this PR introduce _any_ user-facing change? No. Test-only refactor. ### How was this patch tested? `build/sbt sql/Test/compile connect-client-jvm/Test/compile` succeeds. No behavior change. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7) Closes #55709 from zhengruifeng/cleanup-querytest-plantest-mixin. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Ruifeng Zheng <ruifengz@foxmail.com> (cherry picked from commit 96dcc51) Signed-off-by: Ruifeng Zheng <ruifengz@foxmail.com>
Contributor
Author
|
merged to master/4.x |
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?
Removes a few redundant trait mixins in the test hierarchy:
trait QueryTest extends SparkFunSuite with QueryTestBase with PlanTest— dropwith PlanTest.PlanTestisSparkFunSuite with PlanTestBase, both already in the linearization (SparkFunSuiteis the first parent;QueryTestBasealready extendsPlanTestBase). The mixin contributes nothing.Concrete suites that already inherit
SQLHelpertransitively but redeclared it:SqlResourceWithActualMetricsSuite(viaSharedSparkSession)SparkSessionExtensionSuite(viaPlanTest)SQLQueryTestSuite(viaSharedSparkSession)QueryParsingErrorsSuite(viaSharedSparkSession)ClientE2ETestSuite(via Connect'sQueryTest)The now-unused
SQLHelperimports are also removed.Why are the changes needed?
Cleanup. Redundant mixins make the trait hierarchy harder to read and signal confusion about where helpers come from.
Does this PR introduce any user-facing change?
No. Test-only refactor.
How was this patch tested?
build/sbt sql/Test/compile connect-client-jvm/Test/compilesucceeds. No behavior change.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)