baobaoyeye commented on a change in pull request #1739:
URL: https://github.com/apache/hudi/pull/1739#discussion_r447956376



##########
File path: 
hudi-client/src/main/java/org/apache/hudi/table/action/commit/BaseCommitActionExecutor.java
##########
@@ -231,15 +231,7 @@ protected void finalizeWrite(String instantTime, 
List<HoodieWriteStat> stats, Ho
   }
 
   private void updateMetadataAndRollingStats(HoodieCommitMetadata metadata, 
List<HoodieWriteStat> writeStats) {
-    // 1. Look up the previous compaction/commit and get the 
HoodieCommitMetadata from there.
-    // 2. Now, first read the existing rolling stats and merge with the result 
of current metadata.
-
-    // Need to do this on every commit (delta or commit) to support COW and 
MOR.
-    for (HoodieWriteStat stat : writeStats) {
-      String partitionPath = stat.getPartitionPath();
-      // TODO: why is stat.getPartitionPath() null at times here.
-      metadata.addWriteStat(partitionPath, stat);
-    }
+    writeStats.forEach(stat -> metadata.addWriteStat(stat.getPartitionPath(), 
stat));

Review comment:
       Good suggestion, fixed




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


Reply via email to