Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-13299

CreateTableLike to create Iceberg table based on non-Iceberg table

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Frontend
    • ghx-label-11

    Description

      test_delete_complextypes_mixed_files creates an Iceberg table in Hive using CTAS:

      create table ice_complex_delete stored by iceberg stored as orc as
      select * from functional_parquet.complextypestbl; 

      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, CTAS 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

      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.

      Note that functional_parquet.complextypestbl is just a non-partitioned table. It'd be nice to support partitioned tables as well.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stigahuang Quanlong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: