mirror of
https://github.com/apache/impala.git
synced 2026-02-03 09:00:39 -05:00
This patch enables creating Iceberg tables from non-Iceberg HDFS source tables (Parquet, ORC, etc.) using CREATE TABLE LIKE with STORED BY ICEBERG. This provides a metadata-only operation to convert table schemas to Iceberg format without copying data. Supported source types: Parquet, ORC, Avro, Text, and other HDFS-based formats Not supported: Kudu tables, JDBC tables, Paimon tables Use case: This is particularly useful for Apache Hive 3.1 environments where CTAS (CREATE TABLE AS SELECT) with STORED BY ICEBERG is not supported - that feature requires Hive 4.0+. Users can use CREATE TABLE LIKE to create the Iceberg schema, then use INSERT INTO to migrate data. Testing: - Comprehensive tests covering schema conversion with various data types, partitioned and external tables, complex types (STRUCT, ARRAY, MAP) - Bidirectional conversion tests (non-Iceberg → Iceberg and reverse) - Hive interoperability tests verifying data round-trips correctly Change-Id: Id162f217e49e9f396419b09815b92eb7f351881e Reviewed-on: http://gerrit.cloudera.org:8080/23733 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>