danny0405 commented on code in PR #12321:
URL: https://github.com/apache/hudi/pull/12321#discussion_r1858250044


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -777,7 +778,7 @@ static HoodieData<HoodieRecord> 
convertMetadataToRecordIndexRecords(HoodieEngine
     List<HoodieWriteStat> allWriteStats = 
commitMetadata.getPartitionToWriteStats().values().stream()
         .flatMap(Collection::stream).collect(Collectors.toList());
 
-    if (allWriteStats.isEmpty()) {
+    if (allWriteStats.isEmpty() || commitMetadata.getOperationType() == 
WriteOperationType.COMPACT) {

Review Comment:
   It's hard to review such nuances in code, let's add more tests for it.



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