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

Create ORC based table using like clause doesn't copy compression property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.14.0, 1.0.0, 1.2.0
    • 2.0.0
    • File Formats
    • None

    Description

      I found a issue in “create table like” clause, as it is not copying the table properties from ORC File format based table.

      Steps to reproduce:
      Step1 :

      create table orc_table (
      time string)
      stored as ORC tblproperties ("orc.compress"="SNAPPY");
      

      Step 2:

       
      create table orc_table_using_like like orc_table;
      

      Step 3:

      show create table orc_table_using_like;  
      

      Result:

      createtab_stmt
      CREATE TABLE `orc_table_using_like`(
        `time` string)
      ROW FORMAT SERDE 
        'org.apache.hadoop.hive.ql.io.orc.OrcSerde' 
      STORED AS INPUTFORMAT 
        'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' 
      OUTPUTFORMAT 
        'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
      LOCATION
        'hdfs://nameservice1/user/hive/warehouse/gkohli.db/orc_table_using_like'
      TBLPROPERTIES (
        'transient_lastDdlTime'='1437578939')
      

      Issue: 'orc.compress'='SNAPPY' property is missing

      Attachments

        1. HIVE-11340.1.patch
          4 kB
          Yongzhi Chen
        2. HIVE-11340.2.patch
          6 kB
          Yongzhi Chen

        Activity

          People

            ychena Yongzhi Chen
            gauravkohli Gaurav Kohli
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: