diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 673303e575..25dc08338d 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -9226,6 +9226,10 @@ protected ColumnStatistics getJdoResult(GetHelper ctx) throws public List getPartitionColumnStatistics(String catName, String dbName, String tableName, List partNames, List colNames, String engine) throws MetaException, NoSuchObjectException { // Note: this will get stats without verifying ACID. + if (CollectionUtils.isEmpty(partNames) || CollectionUtils.isEmpty(colNames)) { + LOG.info("PartNames and/or ColNames are empty"); + return null; + } return getPartitionColumnStatisticsInternal( catName, dbName, tableName, partNames, colNames, engine, true, true); } @@ -9236,7 +9240,8 @@ protected ColumnStatistics getJdoResult(GetHelper ctx) throws List partNames, List colNames, String engine, String writeIdList) throws MetaException, NoSuchObjectException { - if (partNames == null || partNames.isEmpty()) { + if (CollectionUtils.isEmpty(partNames) || CollectionUtils.isEmpty(colNames)) { + LOG.info("PartNames and/or ColNames are empty"); return null; } List allStats = getPartitionColumnStatisticsInternal(