cshuo commented on code in PR #13495:
URL: https://github.com/apache/hudi/pull/13495#discussion_r2217155838


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/table/action/commit/BaseFlinkCommitActionExecutor.java:
##########
@@ -190,19 +191,13 @@ public Iterator<List<WriteStatus>> handleUpdate(String 
partitionPath, String fil
                                                   Iterator<HoodieRecord<T>> 
recordItr)
       throws IOException {
     // This is needed since sometimes some buckets are never picked in 
getPartition() and end up with 0 records
-    HoodieMergeHandle<?, ?, ?, ?> upsertHandle = (HoodieMergeHandle<?, ?, ?, 
?>) this.writeHandle;
+    HoodieWriteMergeHandle<?, ?, ?, ?> upsertHandle = 
(HoodieWriteMergeHandle<?, ?, ?, ?>) this.writeHandle;

Review Comment:
   The `recordItr` in line 195 can be a one-time iterator, e.g., 
`BinaryInMemorySortBuffer#getIterator` in Flink, in which case we can't only 
use `!recordItr.hasNext()` to check whether the new records is empty, and 
`isEmptyNewRecords` is added to help check that.



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