hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aihua Xu <...@cloudera.com>
Subject Re: Review Request 47353: HIVE-13616: Investigate renaming a table without invalidating the column stats
Date Mon, 16 May 2016 21:06:49 GMT


> On May 16, 2016, 8:53 p.m., Ashutosh Chauhan wrote:
> > metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java, line
651
> > <https://reviews.apache.org/r/47353/diff/1/?file=1382994#file1382994line651>
> >
> >     Actually current code base itself is inconsistent. For db and column names,
we only save lower-case version (no trim()), whereas for table names we do lower-case and
trim.
> >     
> >     I guess best to do here is to be consistent with current implementation.

I see what you mean now. You are concerned that it may cause table join to fail if we join
on db name and some places we store lower-case and some places we store lower-case and trim?

I will make change. BTW: where is the code that we stored lower-case version?


- Aihua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47353/#review133435
-----------------------------------------------------------


On May 13, 2016, 7:17 p.m., Aihua Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47353/
> -----------------------------------------------------------
> 
> (Updated May 13, 2016, 7:17 p.m.)
> 
> 
> Review request for hive and Chaoyu Tang.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-13616: Investigate renaming a table without invalidating the column stats
> 
> 
> Diffs
> -----
> 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 0652b9db1a4224262611ff9258e871647442cfeb

>   ql/src/test/queries/clientpositive/rename_table_update_column_stats.q PRE-CREATION

>   ql/src/test/results/clientpositive/rename_table_update_column_stats.q.out PRE-CREATION

> 
> Diff: https://reviews.apache.org/r/47353/diff/
> 
> 
> Testing
> -------
> 
> Tests have been run and the failed tests don't seem to be related. 
> 
> To carry over the column stats during renaming the table, the patch 
> 1. Save affected column stats
> 2. Rename the table
> 3. Write the saved column stats for the new table.
> 
> In this order, column stats will find the foreign key when writing in 3).
> 
> 
> Thanks,
> 
> Aihua Xu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message