This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new fd6ced288db HIVE-27093: Fix NPE in initialize() of Partition class 
(#4073). (Wechar, reviewed by Ayush Saxena)
fd6ced288db is described below

commit fd6ced288dbf9ce7f3c3a2ca948d78f3b88f170f
Author: Wechar Yu <[email protected]>
AuthorDate: Thu Dec 7 21:56:21 2023 +0800

    HIVE-27093: Fix NPE in initialize() of Partition class (#4073). (Wechar, 
reviewed by Ayush Saxena)
---
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 6b34a2b6972..884aa201627 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 @@ public class Partition implements Serializable {
       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

Reply via email to