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/03/17 08:06:37 UTC

[GitHub] [spark] Deegue commented on a change in pull request #26422: [SPARK-29786][SQL] Fix MetaException when dropping a partition not exists on HDFS

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_r393501378
 
 

 ##########
 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:
   > Isn't it bad for performance? i.e. you call `fs.exists` and `fs.listStatus` for each partition.
   
   Yes, but only affect `drop partitions`. And it won't take much time to do the check while dropping.

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


With regards,
Apache Git Services

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