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_r393434562
##########
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.
----------------------------------------------------------------
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]