Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-744 (Umbrella) ALTER TABLE ADD/DROP PARTITION statement
  3. TAJO-2101

Support add multiple partitions in a single ALTER TABLE statement

Add voteWatch issue
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Catalog, Planner/Optimizer
    • None

    Description

      If TAJO-1891 commit, users can add partition to table using ALTER TABLE statement. But if users want to add many partitions, they should use following form:

      ALTER TABLE table_name ADD PARTITION (partCol = 'value1') location 'location1';
      ALTER TABLE table_name ADD PARTITION (partCol = 'value2') location 'location2';
      ...
      ALTER TABLE table_name ADD PARTITION (partCol = 'valueN') location 'locationN';
      

      In general case, above approach doesn't matter. But if there are lots of partitions, for example, more than hundreds of partitions, it may raise loss of catalog because single statement calls single call of catalog api. Also users may feel inconvenience for using sing statement. We need to allow following form:

      ALTER TABLE page_view ADD PARTITION (dt='2016-03-01', country='kr') location 'location1'
        PARTITION (dt='2016-03-02', country='kr') location 'location2';
      

      Attachments

        Issue Links

          Activity

            People

              blrunner JaeHwa Jung
              blrunner JaeHwa Jung

              Dates

                Created:
                Updated:

                Slack

                  Issue deployment