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 6A67F200CC2 for ; Wed, 5 Jul 2017 19:51:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68BB5163FC2; Wed, 5 Jul 2017 17:51:27 +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 B022B163FC1 for ; Wed, 5 Jul 2017 19:51:26 +0200 (CEST) Received: (qmail 11044 invoked by uid 500); 5 Jul 2017 17:51:25 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 11033 invoked by uid 99); 5 Jul 2017 17:51:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2017 17:51:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 652D4DFB94; Wed, 5 Jul 2017 17:51:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: daijy@apache.org To: commits@hive.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hive git commit: HIVE-17007: NPE introduced by HIVE-16871 (Daniel Dai, reviewed by Sushanth Sowmyan) Date: Wed, 5 Jul 2017 17:51:25 +0000 (UTC) archived-at: Wed, 05 Jul 2017 17:51:27 -0000 Repository: hive Updated Branches: refs/heads/master 0731dab18 -> ae927155d HIVE-17007: NPE introduced by HIVE-16871 (Daniel Dai, reviewed by Sushanth Sowmyan) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ae927155 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ae927155 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ae927155 Branch: refs/heads/master Commit: ae927155d6db5a9e2e07d3d8b51dbf817de817dc Parents: 0731dab Author: Daniel Dai Authored: Wed Jul 5 10:51:12 2017 -0700 Committer: Daniel Dai Committed: Wed Jul 5 10:51:12 2017 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hive/metastore/cache/SharedCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/ae927155/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java ---------------------------------------------------------------------- diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java b/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java index b454372..b6fb4fd 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java @@ -137,7 +137,7 @@ public class SharedCache { } public static synchronized ColumnStatisticsObj getCachedTableColStats(String colStatsCacheKey) { - return tableColStatsCache.get(colStatsCacheKey).deepCopy(); + return tableColStatsCache.get(colStatsCacheKey)!=null?tableColStatsCache.get(colStatsCacheKey).deepCopy():null; } public static synchronized void removeTableColStatsFromCache(String dbName, String tblName) { @@ -426,7 +426,7 @@ public class SharedCache { } public static synchronized ColumnStatisticsObj getCachedPartitionColStats(String key) { - return partitionColStatsCache.get(key).deepCopy(); + return partitionColStatsCache.get(key)!=null?partitionColStatsCache.get(key).deepCopy():null; } public static synchronized void addPartitionColStatsToCache(String dbName, String tableName,