This is an automated email from the ASF dual-hosted git repository.
szehon-ho pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new 6d9e83c879d0 [SPARK-57644][SQL] TxnTableCatalog should delegate
capabilities to underlying catalog
6d9e83c879d0 is described below
commit 6d9e83c879d0589d1aaa70b72f49c8b08caa1afe
Author: Szehon Ho <[email protected]>
AuthorDate: Wed Jun 24 13:55:53 2026 -0700
[SPARK-57644][SQL] TxnTableCatalog should delegate capabilities to
underlying catalog
### What changes were proposed in this pull request?
`TxnTableCatalog` wraps `InMemoryRowLevelOperationTableCatalog` for
transactional row-level operation tests but does not delegate `capabilities()`
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 through `TxnTableCatalog`, even though the
underlying `InMemoryRowLevelOperationTableCatalog` declares 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)
Closes #56713 from szehon-ho/txn-catalog-capabilities.
Authored-by: Szehon Ho <[email protected]>
Signed-off-by: Szehon Ho <[email protected]>
(cherry picked from commit 420b9e2c966df003e02d8ca0067baa0338b0d41a)
Signed-off-by: Szehon Ho <[email protected]>
---
.../src/test/scala/org/apache/spark/sql/connector/catalog/txns.scala | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/txns.scala
b/sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/txns.scala
index 203aed450a5f..0d060b9134a4 100644
---
a/sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/txns.scala
+++
b/sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/txns.scala
@@ -179,6 +179,8 @@ class TxnTableCatalog(delegate:
InMemoryRowLevelOperationTableCatalog) extends T
override def name: String = delegate.name
+ override def capabilities: java.util.Set[TableCatalogCapability] =
delegate.capabilities
+
override def initialize(name: String, options: CaseInsensitiveStringMap):
Unit = {}
override def listTables(namespace: Array[String]): Array[Identifier] = {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]