[SPARK-56695][SQL][DML] Resolve Configured Catalog for Path Based Tables Participating in Transactional Writes#55627
Open
andreaschat-db wants to merge 6 commits intoapache:masterfrom
Conversation
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 fixes an issue where in path based tables we would ignore the data source configured catalog when resolving relations. The DataSource catalog resolution is being moved to
CatalogAndIdentifierso it can by used for both the target of the transactional write as well as the any other tables read.Furthermore, this PR adds validation to only allow a single catalog being used in transactional writes. Mixing path based tables and catalog based in a single write operation is fine as long as all tables resolve to the same catalog.
Why are the changes needed?
The catalog needs to be resolved correctly for all path based tables participating in a transactional write. This includes both the target as well as any other tables read. Without this fix, any scan on path-based tables would miss the configured catalog and would fall back to the session catalog.
Furthermore, in DSv2 transactions it is important to restrict all participating tables to a single catalog. This allows the single transactional catalog to track all reads and predicates that are relevant to the transaction.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added new tests.
Was this patch authored or co-authored using generative AI tooling?
Claude Sonnet 4.6.