[SPARK-57644][SQL] TxnTableCatalog should delegate capabilities to underlying catalog#56713
Open
szehon-ho wants to merge 1 commit into
Open
[SPARK-57644][SQL] TxnTableCatalog should delegate capabilities to underlying catalog#56713szehon-ho wants to merge 1 commit into
szehon-ho wants to merge 1 commit into
Conversation
… to underlying catalog TxnTableCatalog wraps InMemoryRowLevelOperationTableCatalog for transactional tests but does not delegate capabilities(). This means capability-gated features (like SUPPORT_GENERATED_COLUMN_ON_WRITE) are invisible through the transactional wrapper. Fix by delegating capabilities() to the underlying catalog. Co-authored-by: Isaac
HyukjinKwon
approved these changes
Jun 23, 2026
HyukjinKwon
left a comment
Member
There was a problem hiding this comment.
0 blocking, 0 non-blocking, 0 nits.
Clean, minimal, correct delegation fix.
TxnTableCatalog extends TableCatalog directly, so it inherited the empty capabilities() default; delegating to delegate.capabilities is the right fix and mirrors the existing name delegation in the same class. The return type matches the delegate's inherited signature (no import needed, same package), and capabilities are static catalog properties rather than transaction-scoped state, so plain delegation rather than the staged/commit handling used by alterTable is correct. No findings.
dongjoon-hyun
approved these changes
Jun 24, 2026
uros-b
approved these changes
Jun 24, 2026
uros-b
left a comment
Member
There was a problem hiding this comment.
Thank you @szehon-ho and @HyukjinKwon @dongjoon-hyun!
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?
TxnTableCatalogwrapsInMemoryRowLevelOperationTableCatalogfor transactional row-level operation tests but does not delegatecapabilities()to the underlying catalog. This means any capability check through the transactional wrapper returns an empty set.Fix by delegating
capabilities()to the underlying catalog.Why are the changes needed?
Without this delegation, capability-gated features are invisible through the transactional catalog wrapper. For example,
SUPPORT_GENERATED_COLUMN_ON_WRITE(added in SPARK-57644) cannot be checked when the catalog is accessed throughTxnTableCatalog, even though the underlyingInMemoryRowLevelOperationTableCatalogdeclares the capability.Does this PR introduce any user-facing change?
The TxnTableCatalog will expose the capabilities of the underlying Catalog.
How was this patch tested?
Existing tests pass. This is a prerequisite for testing generated column MERGE/UPDATE blocking in SPARK-57644.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-4-6)