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

Support add multiple partitions in a single ALTER TABLE statement

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Catalog, Planner/Optimizer
    • Labels:
      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

              • Assignee:
                blrunner JaeHwa Jung
                Reporter:
                blrunner JaeHwa Jung
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: