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

Changing a column's type doesn't change column stats type in metastore

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      If I have a table at, with a column id of type DOUBLE, the metastore will have an entry in TAB_COL_STATS something like:

      hive_ms=> select "TABLE_NAME", "COLUMN_NAME", "COLUMN_TYPE" from "TAB_COL_STATS" WHERE "TBL_ID" = 1341 AND "COLUMN_NAME" = 'id';
       TABLE_NAME | COLUMN_NAME | COLUMN_TYPE
      ------------+-------------+-------------
       at         | id          | DOUBLE
      

      If in Hive I then do:

      hive> alter table at change column id id int;

      The COLUMN_TYPE column does not change in the metastore. This means that any subsequent attempts to change the column statistics through the metastore client via updateTableColumnStatistics() will silently fail.

        Attachments

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              ctang Chaoyu Tang Assign to me
              Reporter:
              henryr Henry Robinson

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment