You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Sohan Jain <so...@fb.com> on 2011/07/28 08:55:00 UTC

Review Request: HIVE-2319: Calling alter_table after changing partition key comment throws an exception

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

Review request for hive and Paul Yang.


Summary
-------

Altering a table's partition key comments raises an InvalidOperationException. The partition key name and type should not be mutable, but the comment should be able to get changed.


This addresses bug HIVE-2319.
    https://issues.apache.org/jira/browse/HIVE-2319


Diffs
-----

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1151219 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1151219 

Diff: https://reviews.apache.org/r/1213/diff


Testing
-------

Added some test cases to HiveMetaStore that pass.


Thanks,

Sohan


Re: Review Request: HIVE-2319: Calling alter_table after changing partition key comment throws an exception

Posted by Sohan Jain <so...@fb.com>.

> On 2011-07-28 21:51:59, Paul Yang wrote:
> > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java, lines 232-233
> > <https://reviews.apache.org/r/1213/diff/2/?file=28094#file28094line232>
> >
> >     Actually, we can't allow for a different ordering because that would imply a different directory structure. We should just make sure that everything but the comments are equal.

Ok cool, that cleans up the code quite a bit.  The previous implementation only checked if the partition key lists were of the same size, and one contained all elements of the other.  That is, it did not ensure ordering.


> On 2011-07-28 21:51:59, Paul Yang wrote:
> > trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java, line 1036
> > <https://reviews.apache.org/r/1213/diff/2/?file=28095#file28095line1036>
> >
> >     Message should say - it was able to change when it shouldn't have?

Fixed


- Sohan


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


On 2011-07-28 07:06:24, Sohan Jain wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/1213/
> -----------------------------------------------------------
> 
> (Updated 2011-07-28 07:06:24)
> 
> 
> Review request for hive and Paul Yang.
> 
> 
> Summary
> -------
> 
> Altering a table's partition key comments raises an InvalidOperationException. The partition key name and type should not be mutable, but the comment should be able to get changed.
> 
> 
> This addresses bug HIVE-2319.
>     https://issues.apache.org/jira/browse/HIVE-2319
> 
> 
> Diffs
> -----
> 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1151219 
>   trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1151219 
> 
> Diff: https://reviews.apache.org/r/1213/diff
> 
> 
> Testing
> -------
> 
> Added some test cases to HiveMetaStore that pass.
> 
> 
> Thanks,
> 
> Sohan
> 
>


Re: Review Request: HIVE-2319: Calling alter_table after changing partition key comment throws an exception

Posted by Paul Yang <py...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1213/#review1215
-----------------------------------------------------------



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
<https://reviews.apache.org/r/1213/#comment2712>

    Actually, we can't allow for a different ordering because that would imply a different directory structure. We should just make sure that everything but the comments are equal.



trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
<https://reviews.apache.org/r/1213/#comment2713>

    Message should say - it was able to change when it shouldn't have?


- Paul


On 2011-07-28 07:06:24, Sohan Jain wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/1213/
> -----------------------------------------------------------
> 
> (Updated 2011-07-28 07:06:24)
> 
> 
> Review request for hive and Paul Yang.
> 
> 
> Summary
> -------
> 
> Altering a table's partition key comments raises an InvalidOperationException. The partition key name and type should not be mutable, but the comment should be able to get changed.
> 
> 
> This addresses bug HIVE-2319.
>     https://issues.apache.org/jira/browse/HIVE-2319
> 
> 
> Diffs
> -----
> 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1151219 
>   trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1151219 
> 
> Diff: https://reviews.apache.org/r/1213/diff
> 
> 
> Testing
> -------
> 
> Added some test cases to HiveMetaStore that pass.
> 
> 
> Thanks,
> 
> Sohan
> 
>


Re: Review Request: HIVE-2319: Calling alter_table after changing partition key comment throws an exception

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1213/
-----------------------------------------------------------

(Updated 2011-08-04 17:05:08.413032)


Review request for hive and Paul Yang.


Changes
-------

Removed a change in TestMetaStoreEventListener.java that somehow snuck in this diff.


Summary
-------

Altering a table's partition key comments raises an InvalidOperationException. The partition key name and type should not be mutable, but the comment should be able to get changed.


This addresses bug HIVE-2319.
    https://issues.apache.org/jira/browse/HIVE-2319


Diffs (updated)
-----

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1153927 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1153927 

Diff: https://reviews.apache.org/r/1213/diff


Testing
-------

Added some test cases to HiveMetaStore that pass.


Thanks,

Sohan


Re: Review Request: HIVE-2319: Calling alter_table after changing partition key comment throws an exception

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1213/
-----------------------------------------------------------

(Updated 2011-07-28 23:26:15.868719)


Review request for hive and Paul Yang.


Changes
-------

-made changes based on Paul's comments


Summary
-------

Altering a table's partition key comments raises an InvalidOperationException. The partition key name and type should not be mutable, but the comment should be able to get changed.


This addresses bug HIVE-2319.
    https://issues.apache.org/jira/browse/HIVE-2319


Diffs (updated)
-----

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1152020 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1152020 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java 1152020 

Diff: https://reviews.apache.org/r/1213/diff


Testing
-------

Added some test cases to HiveMetaStore that pass.


Thanks,

Sohan


Re: Review Request: HIVE-2319: Calling alter_table after changing partition key comment throws an exception

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1213/
-----------------------------------------------------------

(Updated 2011-07-28 07:06:24.236980)


Review request for hive and Paul Yang.


Changes
-------

Fixed some of the test case logic.


Summary
-------

Altering a table's partition key comments raises an InvalidOperationException. The partition key name and type should not be mutable, but the comment should be able to get changed.


This addresses bug HIVE-2319.
    https://issues.apache.org/jira/browse/HIVE-2319


Diffs (updated)
-----

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1151219 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1151219 

Diff: https://reviews.apache.org/r/1213/diff


Testing
-------

Added some test cases to HiveMetaStore that pass.


Thanks,

Sohan