Conversation
…n on Spark 3.3 df5aa6c (KYUUBI apache#7746) asserts the optimized plan for a not-inlined CTE contains RepartitionByExpression. SPARK-40105 (3.4.0) changed ReplaceCTERefWithRepartition to emit RepartitionByExpression instead of a plain Repartition, so on Spark 3.3 the assertion always fails. Assert Repartition on Spark 3.3 and RepartitionByExpression on 3.4+. Assisted-by: Claude Sonnet 5
Member
Author
|
cc @j1wonpark |
j1wonpark
approved these changes
Sep 21, 2026
j1wonpark
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the follow-up, and sorry for the Spark 3.3 breakage. Verified locally on 3.3.4: both tests pass, and removing the deterministic override in PermanentViewMarker makes them fail again. LGTM (non-binding).
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.
Why are the changes needed?
df5aa6c (KYUUBI #7746) added a test asserting that the optimized plan for a not-inlined nondeterministic CTE contains a
RepartitionByExpressionnode. This assertion fails on Spark 3.3: SPARK-40105 (3.4.0) changedReplaceCTERefWithRepartitionto wrap not-inlined CTE references withRepartitionByExpression; before that it wraps them with a plainRepartition. So on Spark 3.3 the optimized plan containsRepartition, notRepartitionByExpression, and the assertion always fails.How was this patch tested?
Updated the assertion to expect
Repartitionon Spark 3.3 andRepartitionByExpressionon 3.4+, following the existingisSparkV34OrGreaterpattern used elsewhere in this suite.Ran
HiveCatalogRangerSparkExtensionSuiteunder both profiles:Both pass, including the two tests added by KYUUBI #7746.
Was this patch authored or co-authored using generative AI tooling?
Assisted-by: Claude Sonnet 5