> On May 16, 2016, 5:46 p.m., Ashutosh Chauhan wrote:
> > metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java, 
> > lines 698-699
> > <https://reviews.apache.org/r/47353/diff/1/?file=1382994#file1382994line698>
> >
> >     Ideally this should happen in a single transaction on backend db. If 
> > you are not planning to address that in this patch, please leave a TODO in 
> > here.

Are you referring to all the operations in single trsanction so that it can 
rollback completely? 
To my understanding, it will perform all the operations in single transaction 
(of course it depends on RawStore implementation). ObjectStore implementation 
keeps track of a openTrasactionCalls, it will open a real transaction when it 
starts with 0 and it will do a real commit when it ends with 0. If a db 
operation is part of a transaction, it will not start a new transaction.


> On May 16, 2016, 5:46 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>
> >
> >     Don't use normalizeIdentifier() since that does trim() which will be 
> > incorrect. Use .toLowerCase()

I don't get it. Can you explain a little? How does trim() of  the db name and 
table name cause an issue? Are we allowing leading/trailing spaces in the db 
and tables names?


- Aihua


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


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
> 
>

Reply via email to