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

Support partial partition specifications in when enabling/disabling protections in Hive

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • Metastore
    • None
    • Reviewed
    • Hide
      For alter table with partial partition spec, DDLSemanticAnalyzer will call table.getPartitions
      to get all the partitions and insert them to outputs. DDLTask::alterTable will get all the partitions for
      ALTERPROTECTMODE, and alter the mode for all the partitions.
      Show
      For alter table with partial partition spec, DDLSemanticAnalyzer will call table.getPartitions to get all the partitions and insert them to outputs. DDLTask::alterTable will get all the partitions for ALTERPROTECTMODE, and alter the mode for all the partitions.

    Description

      Currently if you have a table t with partition columns c1 and c2 the following command works:
      ALTER TABLE t PARTITION (c1 = 'x', c2 = 'y') ENABLE NO_DROP;

      The following does not:
      ALTER TABLE t PARTITION (c1 = 'x') ENABLE NO_DROP;

      We would like all existing partitions for which c1 = 'x' to have NO_DROP enabled when a user runs the above command

      Attachments

        Activity

          People

            jeanxu Jean Xu
            jeanxu Jean Xu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: