You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/08 11:57:31 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #29316: [SPARK-32508][SQL] Disallow empty part col values in partition spec before static partition writing

cloud-fan commented on a change in pull request #29316:
URL: https://github.com/apache/spark/pull/29316#discussion_r484859737



##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
##########
@@ -341,4 +345,17 @@ case class InsertIntoHiveTable(
         isSrcLocal = false)
     }
   }
+
+  /**
+   * Verify if the input partition spec has any empty value.
+   */
+  protected def requireNonEmptyValueInPartitionSpec(specs: Seq[TablePartitionSpec]): Unit = {
+    specs.foreach { s =>
+      if (s.values.exists(_.isEmpty)) {

Review comment:
       should this be done in an analyzer rule? how do we do the same check for file source tables?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org