Quanlong Huang created IMPALA-13299:
---------------------------------------
Summary: CreateTableLike to create Iceberg table based on
non-Iceberg table
Key: IMPALA-13299
URL: https://issues.apache.org/jira/browse/IMPALA-13299
Project: IMPALA
Issue Type: New Feature
Components: Frontend
Reporter: Quanlong Huang
test_delete_complextypes_mixed_files creates an Iceberg table in Hive using
CTAS:
{code:sql}
create table ice_complex_delete stored by iceberg stored as orc as
select * from functional_parquet.complextypestbl; {code}
When migrating the test to Apache Hive 3.1, this needs to be converted into a
CreateTable and an INSERT statement since {{STORED BY ICEBERG}} is not
supported in Apache Hive 3. The table should be created using {{{}STORED BY
'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler'{}}}. However,
CreateTableLike in Hive 3 doesn't support the {{STORED BY}} storageHandler
clause. It'd be helpful if Impala can create the table itself. Then we can
still use Hive to insert the ORC files.
The statement we need is
{code:sql}
create table my_ice_tbl like functional_parquet.complextypestbl stored by
iceberg;
AnalysisException: functional_parquet.complextypestbl cannot be cloned into an
Iceberg table because it is not an Iceberg table.{code}
Note that functional_parquet.complextypestbl is just a non-partitioned table.
It'd be nice to support partitioned tables as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)