diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java index d5e0db5366c1..18bffce36f7d 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java @@ -3143,6 +3143,9 @@ public Map> updatePartitionColumnStatisticsBatch( public List getFunctions(String catName) throws MetaException { List funcIds = getFunctionIds(catName); + if (funcIds.isEmpty()) { + return Collections.emptyList(); // no functions, bail early. + } // Get full objects. For Oracle/etc. do it in batches. return Batchable.runBatched(batchSize, funcIds, new Batchable() { @Override