Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-27237

Partitioned table statement enhancement

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 2.0.0
    • Table SQL / API
    • None

    Description

      This is an umbrella issue which is used to track the syntax enhancement about partitioned table in FLIP [1]. These new syntaxes are very useful for partitioned tables, especially for batch job.

      The supported statement about partitioned table as follows:

      -- add partition
      ALTER TABLE table_name ADD [IF NOT EXISTS] { PARTITION <partition_spec> [PARTITION <partition_spec> ...] } 
      
      -- drop partition
      ALTER TABLE table_name DROP [ IF EXISTS ] {, PARTITION <partition_spec> [, PARTITION <partition_spec> ...] } 
      
      -- rename partition
      ALTER TABLE table_name PARTITION <partition_spec> RENAME TO PARTITION <partition_spec>;
      
      -- show partitions
      SHOW PARTITIONS table_name [PARTITION <partition_spec>]
      
      
      <partition_spec>:: 
        (partition_col_name=partition_col_val, ...)
       

       

      Reference:

      [1]: https://cwiki.apache.org/confluence/display/FLINK/FLIP-63%3A+Rework+table+partition+support

      [2] https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterPartition

      [3]: https://spark.apache.org/docs/3.2.1/sql-ref-syntax-ddl-alter-table.html#add-partition

      [4]: https://spark.apache.org/docs/3.2.1/sql-ref-syntax-aux-show-partitions.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lsy dalongliu
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: