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

OrcFile table property values are case sensitive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.1
    • 1.3.0, 2.1.0
    • ORC
    • None

    Description

      In Hive v1.2.1.2.3, with Tez , create an external table with compression SNAPPY value marked as lower case. Table is created successfully. Insert data into table fails with no enum constant error.

      CREATE EXTERNAL TABLE mydb.mytable
      (id int)
      PARTITIONED BY (business_date date)
      STORED AS ORC
      LOCATION
      '/data/mydb/mytable'
      TBLPROPERTIES (
      'orc.compress'='snappy');

      set hive.exec.dynamic.partition=true;
      set hive.exec.dynamic.partition.mode=nonstrict;

      INSERT OVERWRITE mydb.mytable PARTITION (business_date)
      SELECT * from mydb.sourcetable;

      Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.hive.ql.io.orc.CompressionKind.snappy
      at java.lang.Enum.valueOf(Enum.java:238)
      at org.apache.hadoop.hive.ql.io.orc.CompressionKind.valueOf(CompressionKind.java:25)

      Constant SNAPPY needs to be uppercase in definition to fix. Case should be agnostic or throw error on creation of table.

      Attachments

        1. HIVE-13146.1.patch
          5 kB
          Yongzhi Chen
        2. HIVE-13146.2.patch
          6 kB
          Yongzhi Chen
        3. HIVE-13146.3.patch
          6 kB
          Yongzhi Chen

        Activity

          People

            ychena Yongzhi Chen
            asears Andrew Sears
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: