liujinhui1994 commented on a change in pull request #3469:
URL: https://github.com/apache/hudi/pull/3469#discussion_r688511397



##########
File path: 
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
##########
@@ -192,7 +193,7 @@ object HoodieSparkSqlWriter {
             }
 
             // Get list of partitions to delete
-            val partitionsToDelete = genericRecords.map(gr => 
keyGenerator.getKey(gr).getPartitionPath).toJavaRDD().distinct().collect()
+            val partitionsToDelete = genericRecords.map(gr => 
gr.get(partitionColumns).toString).toJavaRDD().distinct().collect()

Review comment:
       First of all, thank you very much for your attention to this issue in 
your busy work.
   I will try more unit tests to verify and improve this problem.
   I think your idea is good. I will conduct more verifications. If I find 
other problems and questions, I will feedback them. When I am finished, I will 
request your review here.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to