openinx commented on a change in pull request #1293:
URL: https://github.com/apache/iceberg/pull/1293#discussion_r470376943
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java
##########
@@ -80,14 +85,16 @@ public FlinkCatalog(
String catalogName,
String defaultDatabase,
String[] baseNamespace,
- Catalog icebergCatalog,
+ CatalogLoader catalogLoader,
boolean cacheEnabled) {
super(catalogName, defaultDatabase);
- this.originalCatalog = icebergCatalog;
- this.icebergCatalog = cacheEnabled ? CachingCatalog.wrap(icebergCatalog) :
icebergCatalog;
+ this.originalCatalog = catalogLoader.loadCatalog(
+
HadoopUtils.getHadoopConfiguration(GlobalConfiguration.loadConfiguration()));
+ this.catalogLoader = catalogLoader;
+ this.icebergCatalog = cacheEnabled ? CachingCatalog.wrap(originalCatalog)
: originalCatalog;
this.baseNamespace = baseNamespace;
- if (icebergCatalog instanceof SupportsNamespaces) {
- asNamespaceCatalog = (SupportsNamespaces) icebergCatalog;
Review comment:
I mean: if we enable the `cacheEnabled`, then the icebergCatalog is the
wrapped `Catalog` which is a `CachingCatalog` instance actually. But seems
`CachingCatalog` did not implement the interface `SupportsNamespaces`.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]