You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Gunther Hagleitner (JIRA)" <ji...@apache.org> on 2014/11/12 21:40:39 UTC

[jira] [Updated] (HIVE-8524) When table is renamed stats are lost as changes are not propagated to metastore tables TAB_COL_STATS and PART_COL_STATS

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

Gunther Hagleitner updated HIVE-8524:
-------------------------------------
    Fix Version/s:     (was: 0.14.0)

> When table is renamed stats are lost as changes are not propagated to metastore tables TAB_COL_STATS and PART_COL_STATS 
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-8524
>                 URL: https://issues.apache.org/jira/browse/HIVE-8524
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 0.14.0
>            Reporter: Mostafa Mokhtar
>            Assignee: Gunther Hagleitner
>              Labels: hive
>
> When a Hive table is renamed that the name is not updated in TAB_COL_STATS and PART_COL_STATS.
> Repro 
> 1) Create table 
> 2) insert rows
> 3) Analyze table t1 compute statistics for columns;
> 4) set hive.stats.fetch.column.stats=true;
> 5) Explain select * from t1 where c1 > x 
> 6) ALTER TABLE t1 RENAME TO 2;
> 7) Explain select * from t2 where c1 > x ; /* stats will be missing */
> 8) Query the Metastore tables to validate 
> According to the documentation Metastore should be updated
> {code}
> This statement lets you change the name of a table to a different name.
> As of version 0.6, a rename on a managed table moves its HDFS location as well. (Older Hive versions just renamed the table in the metastore without moving the HDFS location.)
> {code}
> Another related issue is that the schema of  the stats table is not consistent with TBLS and DBS as these two table are normalized while TAB_COL_STATS and PART_COL_STATS have TABLE_NAME and DB_NAME denormalized in them.



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