hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HIVE-9866) Changing a column's type doesn't change column stats type in metastore
Date Fri, 13 Mar 2015 18:58:38 GMT

     [ https://issues.apache.org/jira/browse/HIVE-9866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chaoyu Tang resolved HIVE-9866.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.0

A patch to HIVE-9720 which has been committed to trunk also includes the fix to this issue.
Resolve this JIRA

> Changing a column's type doesn't change column stats type in metastore 
> -----------------------------------------------------------------------
>
>                 Key: HIVE-9866
>                 URL: https://issues.apache.org/jira/browse/HIVE-9866
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Henry Robinson
>            Assignee: Chaoyu Tang
>             Fix For: 1.2.0
>
>
> 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:
> {code}
> 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
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message