Skip to content

[SPARK-56746][SQL][TESTS] Drop redundant PlanTest/SQLHelper trait mixins#55709

Closed
zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng:cleanup-querytest-plantest-mixin
Closed

[SPARK-56746][SQL][TESTS] Drop redundant PlanTest/SQLHelper trait mixins#55709
zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng:cleanup-querytest-plantest-mixin

Conversation

@zhengruifeng
Copy link
Copy Markdown
Contributor

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)

### 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)
@zhengruifeng zhengruifeng changed the title [MINOR][SQL][TESTS] Drop redundant PlanTest/SQLHelper trait mixins [SPARK-56746][SQL][TESTS] Drop redundant PlanTest/SQLHelper trait mixins May 6, 2026
@zhengruifeng zhengruifeng marked this pull request as ready for review May 6, 2026 12:29
@zhengruifeng zhengruifeng requested a review from HyukjinKwon May 6, 2026 12:29
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>
@zhengruifeng
Copy link
Copy Markdown
Contributor Author

zhengruifeng commented May 7, 2026

merged to master/4.x

@zhengruifeng zhengruifeng deleted the cleanup-querytest-plantest-mixin branch May 7, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants