Mihaly Szjatinya created IMPALA-15823:
-----------------------------------------
Summary: Support CREATE TABLE LIKE <table> on Iceberg REST catalogs
Key: IMPALA-15823
URL: https://issues.apache.org/jira/browse/IMPALA-15823
Project: IMPALA
Issue Type: Sub-task
Components: Frontend, Catalog
Reporter: Mihaly Szjatinya
CREATE TABLE ... LIKE <table> into a database served by an Iceberg REST catalog
is not routed to the REST catalog (IMPALA-15499 routes only
{{CreateTableStmt}}, which covers LIKE PARQUET/ORC). {{CreateTableLikeStmt}} is
a separate statement: its {{TCreateTableLikeParams}} carry only the source
table name, and CatalogD copies the source at execution time from its own
catalog. So it fails with unrelated errors:
* LIKE a REST table, with CatalogD: {{DatabaseNotFoundException: Database
'<db>' not found}}
* LIKE a REST table, without CatalogD: {{Operation is not supported without
CatalogD.}}
* LIKE an HMS table: {{Error making 'createTable' RPC to Hive Metastore:
NoSuchObjectException: <db>}}
Supporting it on the coordinator:
* Route {{isCreateTableLikeStmt()}} in {{IcebergRestDdlRouter}} with the CREATE
TABLE checks (unique REST catalog name, Iceberg target, reserved properties).
* Build the schema, partition spec, sort order and properties from the analyzed
source {{FeTable}}, which may be in HMS or in any REST catalog, and reuse
{{IcebergDdlExecutor.createTable}}.
* Stamp the owner of the new table as for CREATE TABLE; never copy {{owner}}
from the source (IMPALA-15508).
* Tests with REST, HMS Iceberg and HMS non-Iceberg sources.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)