Mihaly Szjatinya has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/25039 )

Change subject: IMPALA-15493: Coordinator-local DDL execution for Iceberg REST 
catalogs
......................................................................


Patch Set 8:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/25039/8/fe/src/main/java/org/apache/impala/catalog/CatalogRef.java
File fe/src/main/java/org/apache/impala/catalog/CatalogRef.java:

http://gerrit.cloudera.org:8080/#/c/25039/8/fe/src/main/java/org/apache/impala/catalog/CatalogRef.java@56
PS8, Line 56: or null for
            :    * CatalogD and for REST catalogs without a unique name.
> Just an edge case: A not loaded or missing table skips the unique name chec
Reproduced with two REST catalogs both named 'rest' and a table that fails to 
load (TIME column). getCatalogRef() gives CatalogRef.rest(null), whose 
getRestCatalogName() is null just like CATALOGD's, so getCatalogNameForDdl() 
(Frontend.java:698) sends the DROP to catalogd:
- with catalogd: "CatalogException: Database does not exist: 
impala_rest_dml_test"
- without catalogd: "Operation is not supported without CatalogD."
instead of "DROP TABLE is disabled because the REST catalog does not have a 
unique name", which the same statement gets for a loaded table. The 
missing-table case goes away with Zoltan's IF EXISTS no-op suggestion.

Could getCatalogNameForDdl() reject a REST ref without a name with the same 
error? That needs CatalogRef to tell REST from CatalogD (e.g. isRest()). I can 
share the test I used, or it can be part of IMPALA-15502.


http://gerrit.cloudera.org:8080/#/c/25039/8/fe/src/main/java/org/apache/impala/catalog/local/MultiMetaProvider.java
File fe/src/main/java/org/apache/impala/catalog/local/MultiMetaProvider.java:

http://gerrit.cloudera.org:8080/#/c/25039/8/fe/src/main/java/org/apache/impala/catalog/local/MultiMetaProvider.java@220
PS8, Line 220:           previous.secondaryTables_.forEach((tblName, 
tblProvider) -> {
> I'm planning to upload IMPALA-13698, it'll help the ambiguous cases, and will 
> make the MultiMetaProvider much simpler.

Should IMPALA-13698 eliminate the dbProviders_/CatalogRef stateful routing 
then? I.e. route loaded tables by getCatalogName(), failed ones by a fresh 
listing, and drop the transient-failure protection. That would simplify the 
design a lot, but also settle the kept tables here, the question about 
concurrent listings, and the record diverging across coordinators.


http://gerrit.cloudera.org:8080/#/c/25039/8/tests/custom_cluster/test_iceberg_rest_catalog.py
File tests/custom_cluster/test_iceberg_rest_catalog.py:

http://gerrit.cloudera.org:8080/#/c/25039/8/tests/custom_cluster/test_iceberg_rest_catalog.py@189
PS8, Line 189:     assert not filesystem_client.exists(table_path)
This check would pass the same with or without PURGE: the test server's 
HadoopCatalog always deletes the whole table directory, and `purge` only adds 
files outside it. Impala writes data under `<table location>/data`.

The flag itself is covered by unit tests, to do it in e2e we could e.g. log 
requests on the test server and assert that `purgeRequested=true` is sent only 
with PURGE. That could be done here or in IMPALA-15502. That issue is mostly 
left for additional tests.

PS: About PURGE in general, I assume for REST we chose to rely on the statement 
alone: PURGE means `purgeRequested=true`. Unlike HMS, where `DROP TABLE` 
deletes the data files whenever `external.table.purge=true`, which Impala's 
`CREATE TABLE` sets (see "Dropping Iceberg tables": 
https://github.com/apache/impala/blob/master/docs/topics/impala_iceberg.xml#L326-L333).
 So a plain `DROP TABLE` deletes the data on HMS but leaves it to the server on 
REST. Maybe worth a line in the docs.


http://gerrit.cloudera.org:8080/#/c/25039/8/tests/custom_cluster/test_iceberg_rest_catalog.py@306
PS8, Line 306:   """REST DML and DDL coverage for topologies without HMS."""
Should probably generalize the class name also.



--
To view, visit http://gerrit.cloudera.org:8080/25039
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I932a211b25ea4e24a607d047c35da186d8922d02
Gerrit-Change-Number: 25039
Gerrit-PatchSet: 8
Gerrit-Owner: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Daniel Vanko <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Mihaly Szjatinya <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 28 Oct 2026 19:21:23 +0000
Gerrit-HasComments: Yes

Reply via email to