cloud-fan commented on a change in pull request #25771: [SPARK-28970][SQL]
Implement USE CATALOG/NAMESPACE for Data Source V2
URL: https://github.com/apache/spark/pull/25771#discussion_r325522037
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/DelegatingCatalogExtension.java
##########
@@ -52,22 +53,22 @@ public final void initialize(String name,
CaseInsensitiveStringMap options) {}
@Override
public Identifier[] listTables(String[] namespace) throws
NoSuchNamespaceException {
- return delegate.listTables(namespace);
+ return ((TableCatalog)delegate).listTables(namespace);
Review comment:
this works. One suggestion to make the code work better:
```
private TableCatalog asTableCatalog() {
return (TableCatalog)delegate;
}
```
and here can be `asTableCatalog().listTables(namespace)`. We can do the same
for `asNamespaceCatalog`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]