You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/13 13:24:27 UTC

[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3469: [HUDI-2307] When using delete_partition with ds should not rely on the primary key

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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org