Fix Spark master GroupPartitionsExec after expected key API change [reduced-it] - #16064
Merged
firestarman merged 2 commits intoSep 22, 2026
Merged
firestarman merged 2 commits into
firestarman merged 2 commits into
Conversation
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Contributor
|
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Collaborator
Author
|
build |
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.
Fixes #16063.
Description
The Spark master build fails because SPARK-59289 moved the expected partition keys into the planned grouping and replaced
GroupPartitionsExec.expectedPartitionKeyswith the planner-onlyexpectedKeyCount. The shared Spark 4.2/5.0 GPU implementation still accessed the Spark 4.2 field directly, so the Spark 5.0 shim no longer compiled.This change reads the expected key count through version-specific shims: Spark 4.2 derives it from
expectedPartitionKeys, while Spark 5.0 readsexpectedKeyCount. The value remains planner-only summary metadata; GPU execution continues to use Spark's planned partition groups.SPARK-59289 also made the Spark 5.0
GroupPartitionsExecfactory package-private and requires a valid keyed child during construction. The shared unit-test setup now uses a package-local test shim and a validKeyedPartitioning, preserving the existing compatibility, fallback, and planner-metadata coverage on both Spark versions.There is no user-facing configuration or behavior change.
Validation:
GroupPartitionsExecSuite: 17 tests passedGroupPartitionsExecSuite: 17 tests passedverifywith tests skipped: build succeeded; all-module scalastyle processed 1900 files with no errorsCommands:
mvn -s <settings.xml> -f scala2.13/pom.xml -Dbuildver=500 -Dcuda.version=cuda13 -DwildcardSuites=com.nvidia.spark.rapids.GroupPartitionsExecSuite clean packagemvn -s <settings.xml> -f scala2.13/pom.xml -Dbuildver=420 -Dcuda.version=cuda13 -DwildcardSuites=com.nvidia.spark.rapids.GroupPartitionsExecSuite clean packagemvn -s <settings.xml> -f scala2.13/pom.xml -Dbuildver=500 -Dcuda.version=cuda13 -DskipTests verifyAI assistance was used to prepare the implementation and pull request description.
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance
Performance testing is not required because the change only adapts driver-side planner metadata access and test construction; task-side execution, partition grouping, and sorting are unchanged.