Skip to content

[MINOR][TEST] Drop 'min Spark 3.2' guards in test suites#12574

Open
LuciferYang wants to merge 2 commits into
apache:mainfrom
LuciferYang:gluten-minor-test-drop-min-spark32-guards
Open

[MINOR][TEST] Drop 'min Spark 3.2' guards in test suites#12574
LuciferYang wants to merge 2 commits into
apache:mainfrom
LuciferYang:gluten-minor-test-drop-min-spark32-guards

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Follow-up to the Spark 3.2 cleanup series (#12525, #12541, #12550, and the open #12543 / #12548). This drops the testWithMinSparkVersion("...", "3.2") guard from 18 test callsites: the guard is always true on any currently supported Spark profile (3.3+), so the wrapper is replaced with a plain test("...").

Callsites converted (18 total across 4 test suites)

File Sites
gluten-ut/test/.../GlutenExpressionMappingSuite.scala L50, L71
gluten-hudi/.../HudiSuite.scala L41, L68, L114
backends-velox/.../VeloxColumnarCacheSuite.scala L90
gluten-delta/.../DeltaSuite.scala — single-line L70, L327, L346, L366, L443, L481
gluten-delta/.../DeltaSuite.scala — multi-line inside Seq("name", "id").foreach { … } L112, L155, L187, L222, L249, L274

The DeltaSuite.scala:69 comment "NameMapping is supported in Delta 2.0 (related to Spark3.2.0)" is also dropped — it was pinned to the same 3.2 guard.

Not touched

The testWithMinSparkVersion helper itself (gluten-substrait/.../GlutenQueryTest.scala:132) is kept — it is still used at 60+ other sites with 3.4 / 3.5 / 4.0 minVersion arguments, which remain legitimate on the currently supported Spark matrix.

No behavior change on any supported Spark version.

How was this patch tested?

  • ./build/mvn -Pbackends-velox -Pspark-3.5 -Pspark-ut -pl :gluten-ut-test -am test-compile -DskipTests: SUCCESS
  • ./build/mvn -Pbackends-velox -Pspark-3.5 -Pdelta -pl :gluten-delta -am test-compile -DskipTests: SUCCESS
  • ./build/mvn -Pbackends-velox -Pspark-3.5 -Phudi -pl :gluten-hudi -am test-compile -DskipTests: SUCCESS
  • ./build/mvn -Pbackends-velox -Pspark-3.5 -pl backends-velox -am test-compile -DskipTests: SUCCESS
  • ./dev/format-scala-code.sh: no additional diff
  • Multi-line awk scan for testWithMinSparkVersion(..., "3.[012]") across all */test/*.scala files: 0 remaining occurrences
  • Verified no test-name collisions introduced in any of the 4 touched suites

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude claude-opus-4-7

Spark 3.2 is no longer supported by Gluten (3.3 is the minimum). The
following 12 test callsites used `testWithMinSparkVersion("...", "3.2")`
as a version guard; the check is always true on any supported profile,
so replace them with a plain `test("...")`:

* `gluten-ut/.../GlutenExpressionMappingSuite.scala` (2 sites)
* `gluten-hudi/.../HudiSuite.scala` (3 sites)
* `backends-velox/.../VeloxColumnarCacheSuite.scala` (1 site)
* `gluten-delta/.../DeltaSuite.scala` (6 sites); also drop the adjacent
  "NameMapping is supported in Delta 2.0 (related to Spark3.2.0)" comment,
  which was pinned to the 3.2 guard.

The `testWithMinSparkVersion` helper itself is retained — it is still
used at 60+ other sites for 3.4/3.5/4.0 minVersion guards, which remain
legitimate.

No behavior change on any supported Spark version.
Copilot AI review requested due to automatic review settings July 20, 2026 08:06
@github-actions github-actions Bot added CORE works for Gluten Core VELOX DATA_LAKE labels Jul 20, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the Spark 3.2 deprecation cleanup by removing testWithMinSparkVersion(..., "3.2") wrappers from selected test suites, replacing them with plain test("...") since Gluten only supports Spark 3.3+.

Changes:

  • Replaced 3.2-gated testWithMinSparkVersion wrappers with unconditional test(...) in several suites.
  • Removed a Spark-3.2/Delta-2.0-specific comment tied to the dropped guard.
  • Simplified test definitions in Velox cache, Hudi, Delta, and expression-mapping suites.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
gluten-ut/test/src/test/scala/org/apache/gluten/expressions/GlutenExpressionMappingSuite.scala Converts two Spark-3.2-min-guarded tests to plain test(...).
gluten-hudi/src/test/scala/org/apache/gluten/execution/HudiSuite.scala Converts three Spark-3.2-min-guarded Hudi tests to plain test(...).
gluten-delta/src/test/scala/org/apache/gluten/execution/DeltaSuite.scala Converts several Spark-3.2-min-guarded Delta tests to plain test(...) and drops a related comment.
backends-velox/src/test/scala/org/apache/gluten/execution/VeloxColumnarCacheSuite.scala Converts one Spark-3.2-min-guarded test to plain test(...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Address Copilot review feedback on apache#12574: the original single-line grep
missed 6 additional `testWithMinSparkVersion(..., "3.2")` sites in
DeltaSuite that span three lines each (inside `Seq("name", "id").foreach`
column-mapping loops at L112, L155, L187, L222, L249, L274).

Convert those to plain `test(...)` for consistency. After this commit a
multi-line `awk` scan finds zero remaining `testWithMinSparkVersion(...,
"3.[012]")` sites in the repo.
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@LuciferYang
LuciferYang marked this pull request as ready for review July 20, 2026 12:12
Copilot AI review requested due to automatic review settings July 20, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core DATA_LAKE VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants