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

Duplicate entry for a table in TAB_COL_STATS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.4
    • None
    • Metastore
    • None

    Description

      When analyze <table> command was executed from presto to update the stats of a table for the first time from multiple cluster sharing the same Hive metastore. Duplicate entry for the same table is inserted to the TAB_COL_STATS table.

      This lead to failure executing further analyze <table> commands. 

      Query failed: Multiple entries with same key: dummy=HiveColumnStatistics{integerStatistics=Optional[IntegerStatistics{min=OptionalLong[1], max=OptionalLong[1]}], doubleStatistics=Optional.empty, decimalStatistics=Optional.empty, dateStatistics=Optional.empty, booleanStatistics=Optional.empty, maxValueSizeInBytes=OptionalLong.empty, totalSizeInBytes=OptionalLong.empty, nullsCount=OptionalLong[0], distinctValuesCount=OptionalLong[1]} and dummy=HiveColumnStatistics{integerStatistics=Optional[IntegerStatistics{min=OptionalLong[1], max=OptionalLong[1]}], doubleStatistics=Optional.empty, decimalStatistics=Optional.empty, dateStatistics=Optional.empty, booleanStatistics=Optional.empty, maxValueSizeInBytes=OptionalLong.empty, totalSizeInBytes=OptionalLong.empty, nullsCount=OptionalLong[0], distinctValuesCount=OptionalLong[1]}.
      

      Duplicate records in the TAB_COL_STATS

      '7','default','dual','dummy','smallint','245671','1','1',NULL,NULL,NULL,NULL,'0','1',NULL,NULL,NULL,NULL,'1588345509'
       '11','default','dual','dummy','smallint','245671','1','1',NULL,NULL,NULL,NULL,'0','1',NULL,NULL,NULL,NULL,'1588345509'

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxmithun Mithun Antony
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: