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



##########
File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
##########
@@ -166,6 +175,17 @@ case class InsertIntoHiveTable(
       if (isDynamic.init.zip(isDynamic.tail).contains((true, false))) {
         throw new AnalysisException(ErrorMsg.PARTITION_DYN_STA_ORDER.getMsg)
       }
+    } else if (numStaticPartitions > 0) {
+      // scalastyle:off
+      // ifNotExists is only valid with static partition, refer to
+      // 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries
+      // scalastyle:on
+      if (!oldPart.isEmpty && ifPartitionNotExists) {
+        val partitionStr = 
partitionSpec.map(_.productIterator.mkString("=")).mkString("/")
+        logWarning(s"Partition '$partitionStr' already exist, skip running job 
to overwrite " +

Review comment:
       do we have this warning message before?




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



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

Reply via email to