Mihaly Szjatinya has uploaded a new patch set (#4). ( 
https://gerrit.cloudera.org/25375 )

Change subject: IMPALA-15499: Support CREATE TABLE on Iceberg REST catalogs
......................................................................

IMPALA-15499: Support CREATE TABLE on Iceberg REST catalogs

Impala had no way to create a table in an Iceberg REST namespace:
CREATE TABLE always went to CatalogD, which does not know REST
catalogs. It now runs on the coordinator through the REST catalog that
serves the database, like DROP TABLE and CREATE/DROP DATABASE.

The statement is routed by getCatalogRef(db) of IMPALA-15503: a
database that several catalogs list is rejected as ambiguous, also
when one of them is the Hive Metastore, as is a database whose catalog
cannot be decided. In a database of a REST catalog:
- the table is created through the REST catalog, which needs a unique
  name;
- only Iceberg tables are accepted, without the 'iceberg.catalog'
  table property, as the REST catalog is the Iceberg catalog, and
  without foreign keys;
- IF NOT EXISTS on an existing table is a no-op on the coordinator.

The schema, the partition spec and the table properties are the ones
CatalogD passes to Iceberg, including the comment and the sort
columns. Without LOCATION the REST server picks the location. No owner
is set (IMPALA-15508). CREATE TABLE AS SELECT and CREATE TABLE LIKE
are not covered.

Testing:
- IcebergDdlExecutorTest: CREATE TABLE, including existing tables,
  missing databases and blacklisted tables.
- test_iceberg_rest_catalog.py: test_rest_catalog_create_table with
  and without CatalogD, checking the created metadata and an
  INSERT/SELECT round trip, rejected formats and properties, and an
  ambiguous database; CREATE TABLE without a unique catalog name.

Regression:
- test_iceberg_rest_catalog.py: DROP TABLE, CREATE/DROP DATABASE and
  REST DML share the router, the executor and the catalog providers.
- MultiMetaProviderTest, MetaProviderDecoratorTest: database routing.

Change-Id: I4e8b7a3afa4cbc7d818013272d22d00c91194caa
Assisted-by: Claude Opus 5.5 (GitHub Copilot)
---
M docs/topics/impala_iceberg_rest_catalog.xml
M fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergRESTCatalog.java
M fe/src/main/java/org/apache/impala/service/IcebergDdlExecutor.java
M fe/src/main/java/org/apache/impala/service/IcebergRestDdlRouter.java
M fe/src/test/java/org/apache/impala/service/IcebergDdlExecutorTest.java
M tests/custom_cluster/test_iceberg_rest_catalog.py
6 files changed, 330 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/75/25375/4
--
To view, visit https://gerrit.cloudera.org/25375
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4e8b7a3afa4cbc7d818013272d22d00c91194caa
Gerrit-Change-Number: 25375
Gerrit-PatchSet: 4
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: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to