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

Delete Partition Spec to Unpartition Iceberg Table

    XMLWordPrintableJSON

Details

    • ghx-label-4

    Description

      The partition layout of Iceberg tables can be changed. This is called partition evolution.

      Currently, if we want to update the partition spec to unpartition the table, we can change the partition spec to void.

      CREATE EXTERNAL TABLE ice_table (i INT NULL)
      PARTITIONED BY SPEC(i)
      STORED AS ICEBERG;
      
      ALTER TABLE ice_table SET PARTITION SPEC(VOID(i));

      The partition column was 'i' and now it is 'void(i)'.

      SHOW CREATE TABLE ice_table;
      
      result:
      CREATE EXTERNAL TABLE ice_table (i INT NULL)
      PARTITIONED BY SPEC(VOID(i))
      STORED AS ICEBERG 

      An unpartitioned table should not contain any partition field/transform.

      SHOW CREATE TABLE ice_table_unpartitioned;
      
      result:
      CREATE EXTERNAL TABLE ice_table (i INT NULL)
      STORED AS ICEBERG

       
      The output of DESCRIBE FORMATTED should also reflect this.
      It would be nice to have a simple syntax that enables deleting the partition spec to change the table to unpartitioned. Something like

      ALTER TABLE ice_table SET PARTITION SPEC() 

      Attachments

        Activity

          People

            Unassigned Unassigned
            noemi Noemi Pap-Takacs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: