nsivabalan commented on code in PR #13976:
URL: https://github.com/apache/hudi/pull/13976#discussion_r2374439449


##########
hudi-common/src/main/java/org/apache/hudi/common/data/HoodieData.java:
##########
@@ -220,6 +220,15 @@ <O> HoodieData<O> 
mapPartitions(SerializableFunction<Iterator<T>,
    */
   HoodieData<T> repartition(int parallelism);
 
+  /**
+   * Coalesces underlying collection (if applicable) making sure new {@link 
HoodieData} has
+   * exactly {@code parallelism} partitions or less.
+   *
+   * @param parallelism target number of partitions in the underlying 
collection
+   * @return {@link HoodieData<T>} holding coalesced collection
+   */
+  HoodieData<T> coalesce(int parallelism);

Review Comment:
   I thought about this. in general, I agree w/ your suggestion.
   but specifically here, RDD<WriteStatus> for data table is going to be >=1 
for sure unless its an empty commit. So, coalesce makes sense in this case, 
where we are explicitly setting the parallelism value to 1. 
   will keep it as is for now, just for this use-case. 
   



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