This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 061bd92375a [SPARK-42398][SQL][FOLLOWUP] DelegatingCatalogExtension
should override the new createTable method
061bd92375a is described below
commit 061bd92375ae9232c9b901ab0760f9712790c26f
Author: Wenchen Fan <[email protected]>
AuthorDate: Fri Mar 10 13:00:14 2023 -0800
[SPARK-42398][SQL][FOLLOWUP] DelegatingCatalogExtension should override the
new createTable method
### What changes were proposed in this pull request?
This is a followup of https://github.com/apache/spark/pull/40049 to fix a
small issue: `DelegatingCatalogExtension` should also override the new
`createTable` function and call the session catalog, instead of using the
default implementation.
### Why are the changes needed?
bug fix
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
N/A, too trivial.
Closes #40369 from cloud-fan/api.
Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../spark/sql/connector/catalog/DelegatingCatalogExtension.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/DelegatingCatalogExtension.java
b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/DelegatingCatalogExtension.java
index 534e1b86eca..f6686d2e4d3 100644
---
a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/DelegatingCatalogExtension.java
+++
b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/DelegatingCatalogExtension.java
@@ -102,6 +102,15 @@ public abstract class DelegatingCatalogExtension
implements CatalogExtension {
return asTableCatalog().createTable(ident, schema, partitions, properties);
}
+ @Override
+ public Table createTable(
+ Identifier ident,
+ Column[] columns,
+ Transform[] partitions,
+ Map<String, String> properties) throws TableAlreadyExistsException,
NoSuchNamespaceException {
+ return asTableCatalog().createTable(ident, columns, partitions,
properties);
+ }
+
@Override
public Table alterTable(
Identifier ident,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]