Repository navigation
[GLUTEN-13003][TEST] Replace constant-true testWithMinSparkVersion calls with test - #13004
Merged
jackylee-ch merged 4 commits intoSep 21, 2026
Merged
Conversation
|
Run Gluten Clickhouse CI on x86 |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified in the reviewed changes.
Pull request overview
This PR removes redundant Spark-version guards from tests now that Spark 3.4 is the minimum supported version.
Changes:
- Replaces 95 constant-true guards with
test. - Removes obsolete Spark 3.2 hash-join assertions and outdated comments.
- Preserves meaningful version-specific guards.
File summaries
| File | Description |
|---|---|
gluten-ut/test/src/test/scala/org/apache/gluten/expressions/GlutenExpressionMappingSuite.scala |
Simplifies test registration. |
gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala |
Removes redundant version guards. |
gluten-delta/src/test/scala/org/apache/gluten/execution/DeltaSuite.scala |
Removes redundant guards and an obsolete comment. |
backends-velox/src/test/scala/org/apache/gluten/functions/ScalarFunctionsValidateSuite.scala |
Simplifies scalar-function tests. |
backends-velox/src/test/scala/org/apache/gluten/functions/MathFunctionsValidateSuite.scala |
Simplifies math-function tests. |
backends-velox/src/test/scala/org/apache/gluten/functions/JsonFunctionsValidateSuite.scala |
Simplifies JSON-function tests. |
backends-velox/src/test/scala/org/apache/gluten/functions/DateFunctionsValidateSuite.scala |
Simplifies date-function tests. |
backends-velox/src/test/scala/org/apache/gluten/expression/UDFPartialProjectSuite.scala |
Simplifies UDF tests. |
backends-velox/src/test/scala/org/apache/gluten/execution/VeloxParquetDataTypeValidationSuite.scala |
Simplifies TimestampNTZ tests. |
backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala |
Simplifies aggregate-function tests. |
backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala |
Simplifies operator tests. |
backends-velox/src/test/scala/org/apache/gluten/execution/FallbackSuite.scala |
Simplifies fallback tests. |
backends-velox/src-iceberg/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala |
Simplifies Iceberg tests. |
backends-clickhouse/src-iceberg/test/scala/org/apache/gluten/execution/iceberg/ClickHouseIcebergSuite.scala |
Simplifies Iceberg tests. |
backends-bolt/src/test/scala/org/apache/gluten/functions/ScalarFunctionsValidateSuite.scala |
Simplifies scalar-function tests. |
backends-bolt/src/test/scala/org/apache/gluten/functions/MathFunctionsValidateSuite.scala |
Simplifies math-function tests. |
backends-bolt/src/test/scala/org/apache/gluten/functions/JsonFunctionsValidateSuite.scala |
Simplifies JSON-function tests. |
backends-bolt/src/test/scala/org/apache/gluten/functions/DateFunctionsValidateSuite.scala |
Simplifies date-function tests. |
backends-bolt/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala |
Simplifies operator tests. |
backends-bolt/src/test/scala/org/apache/gluten/execution/BoltStringFunctionsSuite.scala |
Simplifies string-function tests. |
backends-bolt/src/test/scala/org/apache/gluten/execution/BoltHashJoinSuite.scala |
Removes obsolete Spark 3.2 assertions. |
backends-bolt/src/test/scala/org/apache/gluten/execution/BoltColumnarCacheSuite.scala |
Simplifies cache tests. |
backends-bolt/src/test/scala/org/apache/gluten/execution/BoltAggregateFunctionsSuite.scala |
Simplifies aggregate-function tests. |
Review details
- Files reviewed: 23/23 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Run Gluten Clickhouse CI on x86 |
Contributor
Author
|
cc @jackylee-ch |
|
Run Gluten Clickhouse CI on x86 |
Contributor
Author
|
@jackylee-ch can we merge this one? |
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 are proposed in this pull request?
testWithMinSparkVersion(name, floor)registers a case only when the running Spark is at leastfloor(GlutenQueryTest.scala:132). Since #12902 the supported set is {3.4, 3.5, 4.0, 4.1}, so any floor of 3.4 or below is always satisfied and the call is a plaintest(...)wearing a version check. This rewrites all 95 of them across 23 files: 84 with floor"3.4", 9 with"3.3", 2 with"3.2".#12981 left the 3.4 group out of scope deliberately. The 3.3 and 3.2 groups are newer than that cleanup rather than older: #12454 branched before #12954 and merged between #12954 and #12981, so it brought the pattern back into
backends-boltafter the first sweep and before the second one, which touched no bolt file.The helper stays. Ten call sites still pass
"3.5", and that floor does separate 3.4 from the rest.Three things came off with the floors rather than being left dangling.
BoltHashJoinSuite.scalahad a"3.2"floor whose body still branched onstartsWith("3.2.")in two places, so the floor and the assertions were one thing and removing only the floor would have been half a job; both3.2.arms are gone and the surviving expectations are the ones the supported versions already take. Two comments existed only to justify a floor and now say something untrue or pointless:ScalarFunctionsValidateSuite.scala:655claimedWe currently test below functions with Spark v3.4above a group that registers on all four, andDeltaSuite.scala:843noted that TIMESTAMP_NTZ arrived in Spark 3.4, which constrains nothing once 3.4 is the minimum.Otherwise no test body changed. The rewrite was done by script and then run through
spotless:apply, so the remaining edits are the call itself and whatever reflowing scalafmt wanted afterwards; the collapsed multi-line calls are where the line counts move.How was this patch tested?
clean test-compileon Spark 3.4, 3.5, 4.0 and 4.1 with-Pbackends-velox -Pspark-ut -Piceberg -Pdelta, Scala 2.13, which covers the velox, gluten-delta, gluten-iceberg and gluten-ut files. The 3.5 run adds-Pbackends-clickhouseforsrc-iceberg/test, that being the only profile clickhouse builds on.The nine
backends-boltfiles needed a detour, since bolt does not compile on main at all right now. I stacked #12999 on top of this branch, rantest-compile -Pbackends-bolt -Pspark-uton 3.4 and 3.5, then dropped it again, so what is pushed here is the rewrite alone.No suite was run. For the 95 rewritten calls the change cannot alter what a case does, only whether it is registered, and every one of them was already registered on all four supported versions; a script checked that the set of case names each of the 23 files registers is identical before and after. The
BoltHashJoinSuiteassertion change is the one place that needed judgement rather than mechanics, and it cannot be run here: bolt's native library needs Linux plus GCC 10-12 or Clang 16 perdocs/bolt-quick-start.md.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude claude-opus-5
Related issue: #13003