Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-17284

Remove statistics-related table properties from SHOW CREATE TABLE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.3.0
    • SQL
    • None

    Description

      CREATE TABLE t1 (
        c1 INT COMMENT 'bla',
        c2 STRING
      )
      LOCATION '$dir'
      TBLPROPERTIES (
        'prop1' = 'value1',
        'prop2' = 'value2'
      )
      

      The output of SHOW CREATE TABLE t1 is

      CREATE EXTERNAL TABLE `t1`(`c1` int COMMENT 'bla', `c2` string)
      ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
      WITH SERDEPROPERTIES (
        'serialization.format' = '1'
      )
      STORED AS
        INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
        OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
      LOCATION 'file:/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-ee317538-0f8c-42d0-b08c-cf077d94fe75'
      TBLPROPERTIES (
        'rawDataSize' = '-1',
        'numFiles' = '0',
        'transient_lastDdlTime' = '1472424052',
        'totalSize' = '0',
        'prop1' = 'value1',
        'prop2' = 'value2',
        'COLUMN_STATS_ACCURATE' = 'false',
        'numRows' = '-1'
      )
      

      The statistics-related table properties should be skipped by SHOW CREATE TABLE, since it could be incorrect in the newly created table. See the Hive JIRA: https://issues.apache.org/jira/browse/HIVE-13792

      Attachments

        Activity

          People

            smilegator Xiao Li
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: