test: [Spark 4.1.1] unignore SPARK-52921 union partitioning tests#4195
Merged
mbutrovich merged 2 commits intoapache:mainfrom May 3, 2026
Merged
test: [Spark 4.1.1] unignore SPARK-52921 union partitioning tests#4195mbutrovich merged 2 commits intoapache:mainfrom
mbutrovich merged 2 commits intoapache:mainfrom
Conversation
Closes apache#4191. The three SPARK-52921 union output partitioning tests in DataFrameSetOperationsSuite were tagged with IgnoreComet because they collect plan operators with strict pattern matches: case u: UnionExec => u case s: ShuffleExchangeExec => s Comet replaces UnionExec with CometUnionExec (extends CometExec, not UnionExec) and ShuffleExchangeExec with CometShuffleExchangeExec (extends ShuffleExchangeLike, the trait both impls share). The matchers found zero operators and the size assertions failed. Update the matchers in dev/diffs/4.1.1.diff: - ShuffleExchangeExec -> ShuffleExchangeLike (matches both Spark's ShuffleExchangeExec and Comet's CometShuffleExchangeExec). - UnionExec -> match UnionExec OR CometUnionExec; both expose outputPartitioning via SparkPlan. CometShuffleExchangeExec.apply (ShimCometShuffleExchangeExec) sets outputPartitioning = wrapped.outputPartitioning, and CometUnionExec delegates outputPartitioning to its originalPlan (the wrapped UnionExec), so the partitioning equality assertions in the SPARK-52921 tests still hold under Comet.
Spark's strict-mode scalac (-Wconf cat=unused-imports as fatal warning) failed the build because two of the imports added in the previous commit are no longer referenced after switching all matchers to ShuffleExchangeLike: - CometShuffleExchangeExec: unused (no `case _: CometShuffleExchangeExec`) - ShuffleExchangeExec: unused (only ShuffleExchangeLike is matched) Drop both from the diff so the import block matches what the test actually references.
mbutrovich
approved these changes
May 3, 2026
Contributor
mbutrovich
left a comment
There was a problem hiding this comment.
Happy to see more tests running, thanks @andygrove!
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.
Which issue does this PR close?
Closes #4191 (sub-issue of #4098).
Rationale for this change
Three Spark 4.1 tests in `DataFrameSetOperationsSuite` were ignored under Comet:
The tests inspect the executed plan with strict pattern matches:
```scala
case u: UnionExec => u
case s: ShuffleExchangeExec => s
```
Under Comet, `UnionExec` is replaced by `CometUnionExec` (extends `CometExec`, not `UnionExec`) and `ShuffleExchangeExec` is replaced by `CometShuffleExchangeExec` (extends `ShuffleExchangeLike`, the trait both implementations share). The collectors found zero operators, the `size == 1` assertions failed, and the IgnoreComet was added pointing at the umbrella tracking issue #4098.
What changes are included in this PR?
Patch the matchers in `dev/diffs/4.1.1.diff` so the tests recognize Comet's wrappers:
Both are valid for vanilla Spark too: `ShuffleExchangeExec` extends `ShuffleExchangeLike`, and the additional `CometUnionExec` case is simply unreachable when Comet is disabled.
How are these changes tested?
The fix is test-side only (no production code change). The partitioning equality assertions still hold under Comet because:
The Spark SQL CI workflow will exercise the un-ignored tests on Spark 4.1.1.