cloud-fan commented on a change in pull request #26422: [SPARK-29786][SQL] Fix 
MetaException when dropping a partition not exists on HDFS
URL: https://github.com/apache/spark/pull/26422#discussion_r398518675
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
 ##########
 @@ -638,6 +655,17 @@ private[hive] class HiveClientImpl(
             s"No partition is dropped. One partition spec '$s' does not exist 
in table '$table' " +
             s"database '$db'")
         }
+        // Check whether the partition we are going to drop is empty.
+        // We make a dummy one for the empty partition. See [SPARK-29786] for 
more details.
+        parts.foreach { partition =>
+          val partPath = partition.getPath.head
+          if (isEmptyPath(partPath)) {
 
 Review comment:
   I think we need to check non-existing path, not empty path?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to