You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spark 4.2.0 was released on July 14, 2026. Gluten should add initial Spark 4.2.x support, following the Spark 4.1.x support process in #11339.
Spark 4.2 expands Spark SQL/data types, Data Source V2, CDC, Arrow/PySpark behavior, and streaming/state-store areas. These should be validated during the bring-up for possible shim, compatibility, test, or follow-up offload work.
Proposed work
Fix compatibility issues introduced by Spark 4.2
Add Spark 4.2.x build profile
Add Spark 4.2.x shim layer
Add Spark 4.2.x unit test module
Add/enable Spark 4.2.x test suites in CI
Track Spark 4.2.x failed unit tests
Validation areas
new geospatial types/functions
DSv2 CDC, transactions, schema evolution, and metrics
Arrow/PySpark default behavior changes
streaming and state-store changes
new SQL functions, vector/sketch functions, and path resolution
Goal
Initial support should focus on build, shim, and unit-test compatibility first. Native offload support for new Spark 4.2 features can be handled in follow-up issues.
Apache Gluten has not started the work to support Spark 4.2 yet.
At this stage, the community is gathering feedback from users and evaluating the demand and requirements for Spark 4.2 support. That said, we have already seen interest from several customers and users who would like to adopt Spark 4.2. Based on the feedback received so far, I believe Spark 4.2 support will likely become part of the roadmap in the near future, although no formal commitment or timeline has been announced yet.
I'd like to pick this up. I've completed an initial Spark 4.2.0 bring-up for the Velox backend and would be glad to contribute it upstream if the approach looks right to the community.
Mirroring the Spark 4.1 sequence (#11313 → #11347 → #11353 → #11380), which maps onto the proposed work list in the description:
PR
Scope
Size
1
Fix compatibility issues introduced by Spark 4.2 (version-agnostic only)
19 files
2
spark-4.2 build profile + shims/spark42 layer + CI resources
44 files
3
gluten-ut/spark42 unit test module + CI UT jobs
~1850 files
4
Additional Spark 4.2 test suites
4 files
Splitting this way keeps PR-1 and PR-2 small enough to review before the large gluten-ut move lands.
Verification so far
All four branches build against their target profiles. PR-1 is version-agnostic by construction and compile-verified on Spark 3.4, 3.5, 4.0 and 4.1 (it contains no spark42 paths), so it should be safe to merge independently of the rest.
I should be clear about the limits: this is compile and build verification only. I have not been able to execute the unit tests locally, so the suites in PR-3/PR-4 are unproven at runtime — that needs CI (see blocker below).
Both #12567 and #12556 are already in my base, and I did not redo them.
Main compatibility deltas found
Most of the Spark 4.2 delta is absorbed by the shim layer, but not all of it:
SPJ redesign — KeyGroupedPartitioning → KeyedPartitioning, StoragePartitionJoinParams and KeyGroupedPartitionedScan removed, BatchScanExec constructor changed, filteredPartitions now Seq[Option[InputPartition]], runtime filters pushed via PushDownUtils.pushRuntimeFilters.
postDriverMetrics now takes an explicit Array[CustomTaskMetric].
SampleExec.seed became Option[Long].
QueryTest — 4.2 hoists checkAnswer and friends into a new QueryTestBase trait that SharedSparkSession mixes in, which collided with GlutenQueryTest's own copies.
CharType, AppendDataExec, OverwriteByExpressionExec, BroadcastHashJoinExec and DataSourceV2ScanRelation all gained parameters, breaking positional extractor patterns.
One behavioural degradation I want to flag explicitly for review: Spark 4.2 removed spjParams, and I found no scan-level equivalent for the partially-clustered "common partition values" (that logic moved into EnsureRequirements/GroupPartitionsExec). On 4.2 only, getCommonPartitionValues conservatively returns None, which disables the partially-clustered-distribution refinement; the base fully-clustered SPJ path is unaffected. Spark 3.4–4.1 behaviour is unchanged. I'd appreciate scrutiny on whether that's an acceptable starting point or needs a deeper port.
Two things I need help with
The 4.2 UT jobs cannot pass on a code change alone.-Dspark.test.home=/opt/shims/spark42/spark_home/ is baked into the CI container image at image-build time, and docker_image.yml only rebuilds on the Sunday cron. PR-2 adds the install-spark-resources.sh 4.2 lines to the Dockerfiles, but someone with committer rights would need to workflow_dispatch an image rebuild before the UT lanes in PR-3 can go green.
PR-3 must be rebase-merged, not squashed — it uses the move/copy-back commit structure from [Discuss] Keep the commit history when adding a new spark version #11352 so git log --follow keeps history on the migrated suites. I verified --follow still traces through the move into pre-existing history.
Also note the 4.2 UT lane drops -Pdelta: delta-spark_4.2, iceberg-spark-runtime-4.2_2.13 and hudi-spark4.2-bundle_2.13 do not exist on Maven Central yet, so those lanes can only be enabled once artifacts ship.
Happy to adjust the split, ordering, or scope based on what reviewers prefer. Could this issue be assigned to me?
All four PRs are now open. I've opened the whole stack rather than waiting for each to merge, so the full shape of the port is visible for review — but the ordering still matters, and only the first is ready to merge.
Because GitHub requires PRs to target a branch in this repo, each stacked PR's diff currently also shows its parents' commits. Each description states exactly which top-N commits belong to it. I'll rebase and undraft each one as its parent merges, at which point the diffs shrink to their real size.
The whole stack is rebased onto current main (9f6dcb5) as of now. #13020 is compile-verified on Spark 3.4 / 3.5 / 4.0 / 4.1, and the stack tip builds green on 4.2 (clean install -Pspark-ut).
Repeating the two asks from my earlier comment, since they're what actually gates progress:
And one design question I'd rather resolve early than after review: the getCommonPartitionValues → None degradation on 4.2 only, described in #13021. Happy to pursue a fuller solution if that's preferred over landing the gap.
Activity
wangyum commentedon Jul 23, 2026
#12567 and #12556 These are for better compatibility with Spark 4.2, since our internal version has backported lots of Spark 4.2 features:
kapilks commentedon Aug 25, 2026
Have we started with 4.2 support work?
weiting-chen commentedon Aug 25, 2026
Apache Gluten has not started the work to support Spark 4.2 yet.
At this stage, the community is gathering feedback from users and evaluating the demand and requirements for Spark 4.2 support. That said, we have already seen interest from several customers and users who would like to adopt Spark 4.2. Based on the feedback received so far, I believe Spark 4.2 support will likely become part of the roadmap in the near future, although no formal commitment or timeline has been announced yet.
manoj-ragupathy commentedon Sep 14, 2026
I'd like to pick this up. I've completed an initial Spark 4.2.0 bring-up for the Velox backend and would be glad to contribute it upstream if the approach looks right to the community.
cc @weiting-chen @wangyum @baibaichen — following up on the "gathering feedback" note above.
Proposed delivery — four sequenced PRs
Mirroring the Spark 4.1 sequence (#11313 → #11347 → #11353 → #11380), which maps onto the proposed work list in the description:
spark-4.2build profile +shims/spark42layer + CI resourcesgluten-ut/spark42unit test module + CI UT jobsSplitting this way keeps PR-1 and PR-2 small enough to review before the large
gluten-utmove lands.Verification so far
All four branches build against their target profiles. PR-1 is version-agnostic by construction and compile-verified on Spark 3.4, 3.5, 4.0 and 4.1 (it contains no
spark42paths), so it should be safe to merge independently of the rest.I should be clear about the limits: this is compile and build verification only. I have not been able to execute the unit tests locally, so the suites in PR-3/PR-4 are unproven at runtime — that needs CI (see blocker below).
Both #12567 and #12556 are already in my base, and I did not redo them.
Main compatibility deltas found
Most of the Spark 4.2 delta is absorbed by the shim layer, but not all of it:
KeyGroupedPartitioning→KeyedPartitioning,StoragePartitionJoinParamsandKeyGroupedPartitionedScanremoved,BatchScanExecconstructor changed,filteredPartitionsnowSeq[Option[InputPartition]], runtime filters pushed viaPushDownUtils.pushRuntimeFilters.postDriverMetricsnow takes an explicitArray[CustomTaskMetric].SampleExec.seedbecameOption[Long].QueryTest— 4.2 hoistscheckAnswerand friends into a newQueryTestBasetrait thatSharedSparkSessionmixes in, which collided withGlutenQueryTest's own copies.PlatformDependent.allocateDirectNoCleaner.CharType,AppendDataExec,OverwriteByExpressionExec,BroadcastHashJoinExecandDataSourceV2ScanRelationall gained parameters, breaking positional extractor patterns.One behavioural degradation I want to flag explicitly for review: Spark 4.2 removed
spjParams, and I found no scan-level equivalent for the partially-clustered "common partition values" (that logic moved intoEnsureRequirements/GroupPartitionsExec). On 4.2 only,getCommonPartitionValuesconservatively returnsNone, which disables the partially-clustered-distribution refinement; the base fully-clustered SPJ path is unaffected. Spark 3.4–4.1 behaviour is unchanged. I'd appreciate scrutiny on whether that's an acceptable starting point or needs a deeper port.Two things I need help with
-Dspark.test.home=/opt/shims/spark42/spark_home/is baked into the CI container image at image-build time, anddocker_image.ymlonly rebuilds on the Sunday cron. PR-2 adds theinstall-spark-resources.sh 4.2lines to the Dockerfiles, but someone with committer rights would need toworkflow_dispatchan image rebuild before the UT lanes in PR-3 can go green.git log --followkeeps history on the migrated suites. I verified--followstill traces through the move into pre-existing history.Also note the 4.2 UT lane drops
-Pdelta:delta-spark_4.2,iceberg-spark-runtime-4.2_2.13andhudi-spark4.2-bundle_2.13do not exist on Maven Central yet, so those lanes can only be enabled once artifacts ship.Happy to adjust the split, ordering, or scope based on what reviewers prefer. Could this issue be assigned to me?
Generated-by: GitHub Copilot CLI (Claude Opus 5)
manoj-ragupathy commentedon Sep 14, 2026
All four PRs are now open. I've opened the whole stack rather than waiting for each to merge, so the full shape of the port is visible for review — but the ordering still matters, and only the first is ready to merge.
spark42paths)spark-4.2profile +shims/spark42layer + CI resourcesgluten-ut/spark42test module + CI UT jobsBecause GitHub requires PRs to target a branch in this repo, each stacked PR's diff currently also shows its parents' commits. Each description states exactly which top-N commits belong to it. I'll rebase and undraft each one as its parent merges, at which point the diffs shrink to their real size.
The whole stack is rebased onto current
main(9f6dcb5) as of now.#13020is compile-verified on Spark 3.4 / 3.5 / 4.0 / 4.1, and the stack tip builds green on 4.2 (clean install -Pspark-ut).Repeating the two asks from my earlier comment, since they're what actually gates progress:
workflow_dispatchdocker_image.yml. [GLUTEN-12569][CORE] Add Spark 4.2 build profile and shim layer #13021 adds the Spark 4.2 resources to the Dockerfile, but the image only rebuilds on a Sunday cron. Until it's rebuilt, [GLUTEN-12569][CORE] Add Spark 4.2 unit test module (gluten-ut/spark42) #13022's UT lanes can't run regardless of code quality — so the test PRs have no CI signal yet. This is the single biggest blocker.git log --followthrough thespark41 → spark42rename commit (per [Discuss] Keep the commit history when adding a new spark version #11352).And one design question I'd rather resolve early than after review: the
getCommonPartitionValues → Nonedegradation on 4.2 only, described in #13021. Happy to pursue a fuller solution if that's preferred over landing the gap.Generated-by: GitHub Copilot CLI (Claude Opus 5)