Arnab Karmakar has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23733 )

Change subject: IMPALA-13299: Support CREATE TABLE LIKE for Iceberg from HDFS 
sources
......................................................................


Patch Set 4:

(5 comments)

Thanks for the review Zoltan!

http://gerrit.cloudera.org:8080/#/c/23733/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23733/3//COMMIT_MSG@7
PS3, Line 7: HDFS sources
> Title could be more precise, as e.g. Kudu tables are not supported as sourc
Modified commit message.
I've added more test cases covering different table sources.


http://gerrit.cloudera.org:8080/#/c/23733/3//COMMIT_MSG@13
PS3, Line 13:
            : Supported source types: Parquet, ORC, Avro, Text, and other 
HDFS-based formats
            : Not suppor
> What do you mean by this sentence?
Sorry, it was a little misleading but its meant for Apache Hive 3.1 
environments where CTAS (CREATE TABLE AS SELECT) with STORED BY ICEBERG is not 
supported. Ive modified the commit message now.


http://gerrit.cloudera.org:8080/#/c/23733/3/docs/topics/impala_iceberg.xml
File docs/topics/impala_iceberg.xml:

http://gerrit.cloudera.org:8080/#/c/23733/3/docs/topics/impala_iceberg.xml@1030
PS3, Line 1030: "sta
> You could add a section about limitations:
Done


http://gerrit.cloudera.org:8080/#/c/23733/3/fe/src/main/java/org/apache/impala/analysis/CreateTableLikeStmt.java
File fe/src/main/java/org/apache/impala/analysis/CreateTableLikeStmt.java:

http://gerrit.cloudera.org:8080/#/c/23733/3/fe/src/main/java/org/apache/impala/analysis/CreateTableLikeStmt.java@178
PS3, Line 178:     // Validate table format restrictions:
             :     // - JDBC tables cannot be created with CREATE TABLE LIKE 
(targe
> Not sure about the first sentence: "Creating non-Iceberg tables from Iceber
Yes, we do have a bug, creating non-Iceberg from Iceberg does incorrectly copy 
Iceberg properties. Ive added a new condition in 
CatalogOpExecutor#createTableLike that throws an exception and doesnt let 
create non-iceberg table from iceberg source. Ive also added few negative test 
cases for this.

Fixed the comments.


http://gerrit.cloudera.org:8080/#/c/23733/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

http://gerrit.cloudera.org:8080/#/c/23733/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@4673
PS3, Line 4673:           params.if_not_exists, columns, partitionSpec,
              :           
Lists.newArrayList(srcIceTable.getIcebergSchema().identifierFieldNames()),
              :           tableProperties, params.getComment(), debugAction);
              :     } else if 
(!IcebergTable.isIcebergTable(srcTable.getMetaStoreTable())
              :         && IcebergTable.isIcebergTable(tbl)) {
              :       // Creating an Iceberg table from a non-Iceberg source 
table
              :       // Kudu tables should have been rejected during analysis
              :       // in validateCreateKuduTableParams()
              :       Preconditions.checkState(!(srcTable instanceof KuduTable),
              :           "Kudu tables should be rejected in analysis phase");
              :
              :       // For Iceberg, all columns (including partition columns) 
must be in the schema
              :       // Column order matters: non-partitioning columns first, 
then partitioning columns
              :       // This matches Hive's convention for INSERT and 
Iceberg's flat schema model
              :       List<TColumn> columns = new ArrayList<>();
              :       for (Column col: srcTable.getColumnsInHiveOrder()) {
              :         TColumn tcol = col.toThrift();
              :         // Default to nullable for Iceberg (optional fields) if 
not explicitly set
              :
> Can you use a single for-loop with getColumnsInHiveOrder()?
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id162f217e49e9f396419b09815b92eb7f351881e
Gerrit-Change-Number: 23733
Gerrit-PatchSet: 4
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Vanko <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Mihaly Szjatinya <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 28 Jan 2026 19:21:15 +0000
Gerrit-HasComments: Yes

Reply via email to