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

COLUMNS_V2 Metastore table not populated for tables created without an explicit column list.

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 1.1.0
    • Database/Schema
    • None

    Description

      Consider this example table:

      CREATE TABLE avro_test
      ROW FORMAT SERDE
      'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
      STORED as INPUTFORMAT
      'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
      OUTPUTFORMAT
      'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
      TBLPROPERTIES (
      'avro.schema.url'='file:///path/to/the/schema/test_serializer.avsc');

      When I try to run an ANALYZE TABLE for computing column stats on any of the columns, then I get:

      org.apache.hadoop.hive.ql.metadata.HiveException: NoSuchObjectException(message:Column o_orderpriority for which stats gathering is requested doesn't exist.)
      at org.apache.hadoop.hive.ql.metadata.Hive.updateTableColumnStatistics(Hive.java:2280)
      at org.apache.hadoop.hive.ql.exec.ColumnStatsTask.persistTableStats(ColumnStatsTask.java:331)
      at org.apache.hadoop.hive.ql.exec.ColumnStatsTask.execute(ColumnStatsTask.java:343)
      at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:138)
      at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:66)
      at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1383)
      at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1169)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:982)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:902)
      at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
      at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:208)

      The root cause appears to be that the COLUMNS_V2 table in the Metastore isn't populated properly during the table creation.

      Attachments

        1. HIVE-6308.1.patch
          6 kB
          Yongzhi Chen

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ychena Yongzhi Chen Assign to me
            alex.behm Alexander Behm
            Votes:
            2 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment