cxzl25 commented on a change in pull request #29316:
URL: https://github.com/apache/spark/pull/29316#discussion_r485420463



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
##########
@@ -847,4 +847,26 @@ class InsertSuite extends QueryTest with TestHiveSingleton 
with BeforeAndAfter
       }
     }
   }
+
+  test("SPARK-32508 " +
+    "Disallow empty part col values in partition spec before static partition 
writing") {
+    withTable("t1") {
+      spark.sql(
+        """
+          |CREATE TABLE t1 (c1 int)

Review comment:
       hive calls `getPartition` when `loadPartition`, here it will check 
whether the partition value is empty.
   
   ```java
   public Partition getPartition(...){
             || (val != null && val.length() == 0)) {
           throw new HiveException("get partition: Value for key "
               + field.getName() + " is null or empty");
   }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to