Deegue 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_r398346211
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
 ##########
 @@ -633,6 +645,17 @@ private[hive] class HiveClientImpl(
         // whose specs are supersets of this partial spec. E.g. If a table has 
partitions
         // (b='1', c='1') and (b='1', c='2'), a partial spec of (b='1') will 
match both.
         val parts = client.getPartitions(hiveTable, s.asJava).asScala
+        // 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.
 
 Review comment:
   > Does Spark have a problem to do table scan when partition directory not 
exist?
   
   It's related to [#24668](https://github.com/apache/spark/pull/24668), and 
controlled by `spark.sql.files.ignoreMissingFiles`.
   Spark will check it when listing leaf files.

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