Skip to content

[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
andreaschat-db:dsv2TransactionSingleCatalogEnforcement
Open

[SPARK-56695][SQL][DML] Resolve Configured Catalog for Path Based Tables Participating in Transactional Writes#55627
andreaschat-db wants to merge 6 commits intoapache:masterfrom
andreaschat-db:dsv2TransactionSingleCatalogEnforcement

Conversation

@andreaschat-db
Copy link
Copy Markdown
Contributor

@andreaschat-db andreaschat-db commented Apr 30, 2026

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 CatalogAndIdentifier so 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.

@andreaschat-db andreaschat-db changed the title [WIP][SQL][DML] Forbid Multi-catalog operations in Transactional Writes [WIP][SQL][DML] Resolve the Catalog of all Path-based Tables participating in a Transactional Write May 1, 2026
@andreaschat-db andreaschat-db changed the title [WIP][SQL][DML] Resolve the Catalog of all Path-based Tables participating in a Transactional Write [SPARK-56695][SQL][DML] Resolve the Catalog of all Path-based Tables participating in a Transactional Write May 1, 2026
@andreaschat-db andreaschat-db changed the title [SPARK-56695][SQL][DML] Resolve the Catalog of all Path-based Tables participating in a Transactional Write [SPARK-56695][SQL][DML] Resolve Configured Catalog for Path Based Tables Participating in Transactional Writes May 1, 2026
@andreaschat-db andreaschat-db marked this pull request as ready for review May 1, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant