[core][spark] Fix RTAS reads after incompatible nested type replace#8469
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9def7cb to
f146dec
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
+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.
Purpose
Fix
CREATE OR REPLACE TABLE ... AS SELECTafter an incompatible nested type replace.The issue happens in the two-snapshot RTAS flow:
Without extra handling, the RTAS append snapshot can still inherit stale snapshot state from the truncate snapshot. This is especially problematic for incompatible schema replacement, where latest-table reads may observe old metadata/state that should not survive the replace.
This change:
DDLTestBasethat reproduces the incompatible nested-type RTAS read failureTests
mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=FileStoreCommitTest#testRtasAppendAfterTruncateResetsInheritedIndexAndStats testmvn -pl paimon-spark/paimon-spark-3.5 -Pspark3,fast-build -DfailIfNoTests=false -DwildcardSuites=org.apache.paimon.spark.sql.DDLTest -Dtest=none testmvn -Pspark3 spotless:apply