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

Unable to drop a default partition with "int" type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.0.0
    • None
    • Query Processor
    • None

    Description

      CREATE TABLE test (col1 string) PARTITIONED BY (p1 int) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' STORED AS TEXTFILE;
      INSERT OVERWRITE TABLE test PARTITION (p1) SELECT code, IF(salary > 60000, 100, null) as p1 FROM default.sample_07;
      hive> SHOW PARTITIONS test;
      OK
      p1=100
      p1=__HIVE_DEFAULT_PARTITION__
      Time taken: 0.124 seconds, Fetched: 2 row(s)
      
      hive> ALTER TABLE test DROP partition (p1 = '__HIVE_DEFAULT_PARTITION__');
      FAILED: SemanticException Unexpected unknown partitions for (p1 = null)
      

      The default partition name '_HIVE_DEFAULT_PARTITION_' cannot be deleted.

      Attachments

        Issue Links

          Activity

            People

              aihuaxu Aihua Xu
              aihuaxu Aihua Xu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: