[ 
https://issues.apache.org/jira/browse/HIVE-15353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356947#comment-16356947
 ] 

Peter Vary commented on HIVE-15353:
-----------------------------------

Hi [~erwaman],

Recently we created several MetaStore API tests. I think creating a table with 
null cols is tested here:

[https://github.com/apache/hive/blob/6e9b63e48b4f34ba26a6eefb354b0c94ee82256c/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java#L411]

So most probably it is not possible to create a table like this anymore (at 
least not in 3.0.0 :) ).

Thanks,

Peter

> Metastore throws NPE if StorageDescriptor.cols is null
> ------------------------------------------------------
>
>                 Key: HIVE-15353
>                 URL: https://issues.apache.org/jira/browse/HIVE-15353
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 2.2.0
>            Reporter: Anthony Hsu
>            Assignee: Anthony Hsu
>            Priority: Major
>         Attachments: HIVE-15353.1.patch, HIVE-15353.2.patch, 
> HIVE-15353.3.patch, HIVE-15353.4.patch, HIVE-15353.5.patch
>
>
> When using the HiveMetaStoreClient API directly to talk to the metastore, you 
> get NullPointerExceptions when StorageDescriptor.cols is null in the 
> Table/Partition object in the following calls:
>  * create_table
>  * alter_table
>  * alter_partition
> Calling add_partition with StorageDescriptor.cols set to null causes null to 
> be stored in the metastore database and subsequent calls to alter_partition 
> for that partition to fail with an NPE.
> Null checks should be added to eliminate the NPEs in the metastore.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to