You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Anthony Hsu (JIRA)" <ji...@apache.org> on 2016/12/03 19:04:58 UTC

[jira] [Updated] (HIVE-15353) Metastore throws NPE if StorageDescriptor.cols is null

     [ https://issues.apache.org/jira/browse/HIVE-15353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anthony Hsu updated HIVE-15353:
-------------------------------
    Attachment: HIVE-15353.1.patch

Uploaded patch. Also posted to RB: https://reviews.apache.org/r/54341/

> 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
>         Attachments: HIVE-15353.1.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.
> The simplest way to fix these NPEs seems to be to update the StorageDescriptor.cols Thrift definition and set a default value of empty list. Some null checks will also have to be added to handle existing nulls in the metastore database.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)