diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java index 6b34a2b69729..884aa2016279 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java @@ -166,7 +166,7 @@ protected void initialize(Table table, return; } - if (table.isPartitioned()) { + if (table.isPartitioned() && tPartition.isSetSd()) { try { if (tPartition.getSd().getLocation() == null) { // set default if location is not set and this is a physical