[4.3][Spark] Block unsupported maintenance on catalog-managed tables - #7527
Open
timothyw553 wants to merge 3 commits into
Open
[4.3][Spark] Block unsupported maintenance on catalog-managed tables#7527timothyw553 wants to merge 3 commits into
timothyw553 wants to merge 3 commits into
Conversation
Signed-off-by: Timothy Wang <timothy.art@gmail.com> (cherry picked from commit da24946)
Signed-off-by: Timothy Wang <timothy.art@gmail.com> (cherry picked from commit 966cb2ed164c462c4d073c277fa73d9fe0960d10)
Signed-off-by: Timothy Wang <timothy.art@gmail.com> (cherry picked from commit 427b490)
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.
Backport of #7525 to
branch-4.3.Which Delta project/connector is this regarding?
Description
Catalog-managed tables must not run maintenance operations without catalog permission. This patch adds checks at these entry points:
MetadataCleanup.doLogCleanup: Skip automatic expired-log cleanup after a checkpoint.MetadataCleanup.cleanUpExpiredLogs: Reject a direct metadata-cleanup call.AutoCompact.run: Skip automatic file compaction after a write.WriteIntoDelta: Reject rearrange-only writes, which usedataChange=false.RemoveColumnMappingCommand.run: Reject column-mapping removal because it rewrites data files.Checkpoint creation and normal writes remain enabled. Tables that are not catalog-managed keep their current behavior.
How was this patch tested?
These focused tests passed:
Does this PR introduce any user-facing changes?
Yes. Delta Spark no longer runs these unsupported maintenance operations on a catalog-managed table.