Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-6133

Support partial partition exchange

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Query Processor
    • None

    Description

      Current alter exchange coerces source and destination table to have same partition columns. But source table has sub-set of partitions and provided partition spec supplements to be a complete partition spec, it need not to be that.

      For example, table into partition

      CREATE TABLE exchange_part_test1 (f1 string) PARTITIONED BY (ds STRING);
      CREATE TABLE exchange_part_test2 (f1 string) 
      ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH TABLE exchange_part_test2;
      

      or

      partial partitions into parent partition

      CREATE TABLE exchange_part_test1 (f1 string) PARTITIONED BY (ds STRING, hr STRING);
      CREATE TABLE exchange_part_test2 (f1 string) PARTITIONED BY (hr STRING)
      ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH TABLE exchange_part_test2;
      

      can be possible.

      Attachments

        1. HIVE-6133.1.patch.txt
          42 kB
          Navis Ryu

        Issue Links

          Activity

            People

              navis Navis Ryu
              navis Navis Ryu
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: