Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C9F8F200BDF for ; Sat, 3 Dec 2016 20:04:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C7392160B0F; Sat, 3 Dec 2016 19:04:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 468A0160B16 for ; Sat, 3 Dec 2016 20:04:59 +0100 (CET) Received: (qmail 18208 invoked by uid 500); 3 Dec 2016 19:04:58 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 18188 invoked by uid 99); 3 Dec 2016 19:04:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2016 19:04:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 600962C14F3 for ; Sat, 3 Dec 2016 19:04:58 +0000 (UTC) Date: Sat, 3 Dec 2016 19:04:58 +0000 (UTC) From: "Anthony Hsu (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-15353) Metastore throws NPE if StorageDescriptor.cols is null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 03 Dec 2016 19:05:00 -0000 [ https://issues.apache.org/jira/browse/HIVE-15353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anthony Hsu updated HIVE-15353: ------------------------------- Status: Patch Available (was: Open) > 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)