[SPARK-55631][SQL] ALTER TABLE must invalidate cache for DSv2 tables#54427
Closed
aokolnychyi wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-55631][SQL] ALTER TABLE must invalidate cache for DSv2 tables#54427aokolnychyi wants to merge 1 commit intoapache:masterfrom
aokolnychyi wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
Author
szehon-ho
reviewed
Feb 23, 2026
Member
szehon-ho
left a comment
There was a problem hiding this comment.
it makes sense / safer to invalidate to me. I guess it is for V2 (pr title could reflect it)
gengliangwang
approved these changes
Feb 24, 2026
cloud-fan
reviewed
Feb 24, 2026
|
|
||
| val result = sql(s"SELECT * FROM $t ORDER BY id") | ||
| assertCached(result) | ||
| checkAnswer(result, Seq(Row(1, "a", null), Row(2, "b", null))) |
Contributor
There was a problem hiding this comment.
what was the error message before this PR?
Contributor
Author
There was a problem hiding this comment.
This would return successfully but use the cached state (old schema), which breaks the assumption that session changes are always propagated and visible.
cloud-fan
approved these changes
Feb 24, 2026
yaooqinn
approved these changes
Feb 25, 2026
Member
|
Thanks, merging to master |
Member
|
@aokolnychyi do we need this fix for branch-4.1? |
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 were proposed in this pull request?
This PR makes ALTER TABLE command invalidate cache.
Why are the changes needed?
These changes are needed to reflect changes made in the session correctly.
Does this PR introduce any user-facing change?
ALTER TABLE commands will now invalidate cache.
How was this patch tested?
This PR comes with test that would previously fail.
Was this patch authored or co-authored using generative AI tooling?
No.