You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Anthony Hsu <ah...@linkedin.com> on 2016/12/03 19:02:22 UTC

Review Request 54341: HIVE-15353: Metastore throws NPE if StorageDescriptor.cols is null

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

Review request for hive.


Bugs: HIVE-15353
    https://issues.apache.org/jira/browse/HIVE-15353


Repository: hive-git


Description
-------

Set a default value for StorageDescriptor.cols of empty list to avoid having to do null checks everywhere. However, null checks are still needed to guard against existing null values in the database (add_partition previously allowed you to store nulls in the database).


Diffs
-----

  metastore/if/hive_metastore.thrift baab31bb0f44361847224843f905c0417b1670be 
  metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h 6838133083684ee3b93a93129bb492ab29a4842e 
  metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java 938f06bbce7a2b213e901f153e1da4606339c0cf 
  metastore/src/gen/thrift/gen-php/metastore/Types.php b9af4efc5f8b7cdf19236db7d68865bdec8382a5 
  metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py 21c039006fc05bc603fda0eeedc92174583f8403 
  metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb c73593298bbddb46e0926b01ccb9c6fb5d880452 
  metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 86565a4198d5daced5e230a41d8ada577a656268 
  metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 9ea6ac40d6f0eb9081c5cfad982ffc435f15f6fd 

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


Testing
-------

After making these changes, I no longer encounter NullPointerExceptions when setting cols to null in create_table, alter_table, and alter_partition calls.


Thanks,

Anthony Hsu


Re: Review Request 54341: HIVE-15353: Metastore throws NPE if StorageDescriptor.cols is null

Posted by Carl Steinbach <cw...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54341/#review196927
-----------------------------------------------------------


Ship it!




Ship It!

- Carl Steinbach


On Feb. 6, 2018, 3:01 a.m., Anthony Hsu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54341/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2018, 3:01 a.m.)
> 
> 
> Review request for hive, Carl Steinbach and Ratandeep Ratti.
> 
> 
> Bugs: HIVE-15353
>     https://issues.apache.org/jira/browse/HIVE-15353
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Updated HiveAlterHandler.updateOrGetPartitionColumnStats to handle null `oldCols`.
> 
> 
> Diffs
> -----
> 
>   standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 89354a2d34249903a9ff13c4ed913a68de93057e 
> 
> 
> Diff: https://reviews.apache.org/r/54341/diff/4/
> 
> 
> Testing
> -------
> 
> After making these changes, I no longer encounter NullPointerExceptions when setting cols to null in create_table, alter_table, and alter_partition calls.
> 
> 
> Thanks,
> 
> Anthony Hsu
> 
>


Re: Review Request 54341: HIVE-15353: Metastore throws NPE if StorageDescriptor.cols is null

Posted by Anthony Hsu via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54341/
-----------------------------------------------------------

(Updated 二月 6, 2018, 3:01 a.m.)


Review request for hive, Carl Steinbach and Ratandeep Ratti.


Changes
-------

Rebased on HEAD.


Bugs: HIVE-15353
    https://issues.apache.org/jira/browse/HIVE-15353


Repository: hive-git


Description (updated)
-------

Updated HiveAlterHandler.updateOrGetPartitionColumnStats to handle null `oldCols`.


Diffs (updated)
-----

  standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 89354a2d34249903a9ff13c4ed913a68de93057e 


Diff: https://reviews.apache.org/r/54341/diff/4/

Changes: https://reviews.apache.org/r/54341/diff/3-4/


Testing
-------

After making these changes, I no longer encounter NullPointerExceptions when setting cols to null in create_table, alter_table, and alter_partition calls.


Thanks,

Anthony Hsu


Re: Review Request 54341: HIVE-15353: Metastore throws NPE if StorageDescriptor.cols is null

Posted by Anthony Hsu <ah...@linkedin.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54341/
-----------------------------------------------------------

(Updated \u5341\u4e8c\u6708 8, 2016, 9:23 p.m.)


Review request for hive.


Changes
-------

New version no longer updates the Thrift definition but just fixes the NPEs in the alter_partition code path.


Bugs: HIVE-15353
    https://issues.apache.org/jira/browse/HIVE-15353


Repository: hive-git


Description (updated)
-------

Update alter_partition() code path to fix NPEs.


Diffs (updated)
-----

  metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 86565a4198d5daced5e230a41d8ada577a656268 
  metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 9ea6ac40d6f0eb9081c5cfad982ffc435f15f6fd 

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


Testing
-------

After making these changes, I no longer encounter NullPointerExceptions when setting cols to null in create_table, alter_table, and alter_partition calls.


Thanks,

Anthony Hsu


Re: Review Request 54341: HIVE-15353: Metastore throws NPE if StorageDescriptor.cols is null

Posted by Anthony Hsu <ah...@linkedin.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54341/
-----------------------------------------------------------

(Updated \u5341\u4e8c\u6708 5, 2016, 5:30 p.m.)


Review request for hive.


Changes
-------

Fixed HiveMetaStore unit tests.


Bugs: HIVE-15353
    https://issues.apache.org/jira/browse/HIVE-15353


Repository: hive-git


Description
-------

Set a default value for StorageDescriptor.cols of empty list to avoid having to do null checks everywhere. However, null checks are still needed to guard against existing null values in the database (add_partition previously allowed you to store nulls in the database).


Diffs (updated)
-----

  itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 21d1b46fcbd4f8f10ee447dce9d40dd6b43a2793 
  metastore/if/hive_metastore.thrift baab31bb0f44361847224843f905c0417b1670be 
  metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h 6838133083684ee3b93a93129bb492ab29a4842e 
  metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java 938f06bbce7a2b213e901f153e1da4606339c0cf 
  metastore/src/gen/thrift/gen-php/metastore/Types.php b9af4efc5f8b7cdf19236db7d68865bdec8382a5 
  metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py 21c039006fc05bc603fda0eeedc92174583f8403 
  metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb c73593298bbddb46e0926b01ccb9c6fb5d880452 
  metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 86565a4198d5daced5e230a41d8ada577a656268 
  metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 9ea6ac40d6f0eb9081c5cfad982ffc435f15f6fd 

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


Testing
-------

After making these changes, I no longer encounter NullPointerExceptions when setting cols to null in create_table, alter_table, and alter_partition calls.


Thanks,

Anthony Hsu