Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0, 3.0.0
    • None
    • None

    Description

      after analyzing an empty table may lead to an NPE when inserting into it...

      2018-03-13T06:54:22,503 ERROR [df3fb505-e0bc-4595-a874-b735dab8dff6 main] metastore.RetryingHMSHandler: java.lang.NullPointerException
              at org.apache.hadoop.hive.metastore.api.Decimal.compareTo(Decimal.java:318)
              at org.apache.hadoop.hive.metastore.columnstats.merge.DecimalColumnStatsMerger.merge(DecimalColumnStatsMerger.java:35)
              at org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.mergeColStats(MetaStoreUtils.java:778)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.set_aggr_stats_for(HiveMetaStore.java:6934)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147)
              at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108)
              at com.sun.proxy.$Proxy55.set_aggr_stats_for(Unknown Source)
      [...]
      

      reproduce

      set hive.stats.autogather=true;
      set hive.explain.user=true;
      
      drop table if exists testdeci2;
      
      create table testdeci2(
      id int,
      amount decimal(10,3),
      sales_tax decimal(10,3),
      item string)
      stored as orc location '/tmp/testdeci2'
      TBLPROPERTIES ("transactional"="false")
      ;
      
      
      analyze table testdeci2 compute statistics for columns;
      
      insert into table testdeci2 values(1,12.123,12345.123,'desk1'),(2,123.123,1234.123,'desk2');
      

      Attachments

        1. HIVE-18946.01.patch
          5 kB
          László Bodor
        2. HIVE-18946.02.patch
          10 kB
          László Bodor
        3. HIVE-18946.03.patch
          13 kB
          László Bodor

        Issue Links

        Activity

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

          People

            abstractdog László Bodor Assign to me
            kgyrtkirk Zoltan Haindrich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment