Nandor Kollar has posted comments on this change. ( https://gerrit.cloudera.org/25374 )
Change subject: IMPALA-15503: Support CREATE/DROP DATABASE on Iceberg REST catalogs ...................................................................... Patch Set 2: (3 comments) Overall LGTM. I just have three minor points I'd like to discuss https://gerrit.cloudera.org/#/c/25374/2/fe/src/main/java/org/apache/impala/catalog/local/LocalCatalog.java File fe/src/main/java/org/apache/impala/catalog/local/LocalCatalog.java: https://gerrit.cloudera.org/#/c/25374/2/fe/src/main/java/org/apache/impala/catalog/local/LocalCatalog.java@242 PS2, Line 242: public boolean isMultiCatalog() { return metaProvider_ instanceof MultiMetaProvider; } nit: Could we let the MetaProvider decide this instead of checking instanceof MultiMetaProvider? It works today, but it is fragile: it silently returns false once the top-level provider is wrapped in a decorator, or once another provider that serves several catalogs is added. If isMultiCatalog() is only a temporary solution until three-level namespaces are supported, this is fine. If it stays, I'd suggest adding isMultiCatalog() to MetaProvider (false by default, true in MultiMetaProvider, delegated by MetaProviderDecorator) and calling metaProvider_.isMultiCatalog() here. https://gerrit.cloudera.org/#/c/25374/2/fe/src/main/java/org/apache/impala/catalog/local/MultiMetaProvider.java File fe/src/main/java/org/apache/impala/catalog/local/MultiMetaProvider.java: https://gerrit.cloudera.org/#/c/25374/2/fe/src/main/java/org/apache/impala/catalog/local/MultiMetaProvider.java@177 PS2, Line 177: if (dbNames.stream().noneMatch(name -> name.equalsIgnoreCase(dbName))) continue; nit: dbNames.stream().noneMatch(dbName::equalsIgnoreCase) https://gerrit.cloudera.org/#/c/25374/2/fe/src/test/java/org/apache/impala/service/IcebergDdlExecutorTest.java File fe/src/test/java/org/apache/impala/service/IcebergDdlExecutorTest.java: https://gerrit.cloudera.org/#/c/25374/2/fe/src/test/java/org/apache/impala/service/IcebergDdlExecutorTest.java@248 PS2, Line 248: IcebergDdlExecutor.execDdl(catalogManager_, nit: can we please avoid these ugly `try { fail} catch{assert}` patterns? I know this is common in Impala, but Junit offers better alternatives. Can we please use assertThrows + assertTrue(e.getMessage(), e.getMessage().contains()); pattern instead? -- To view, visit https://gerrit.cloudera.org/25374 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I738850dd6103f1bd4417379e0ebea56b00543e90 Gerrit-Change-Number: 25374 Gerrit-PatchSet: 2 Gerrit-Owner: Mihaly Szjatinya <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Mihaly Szjatinya <[email protected]> Gerrit-Reviewer: Nandor Kollar <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Wed, 11 Nov 2026 09:15:30 +0000 Gerrit-HasComments: Yes
