danny0405 commented on code in PR #18016:
URL: https://github.com/apache/hudi/pull/18016#discussion_r2772110631
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -241,6 +246,21 @@ private Stream<String>
getPartitionsForInstants(HoodieInstant instant) {
} else {
HoodieCommitMetadata commitMetadata =
hoodieTable.getActiveTimeline().readCommitMetadata(instant);
+ WriteOperationType operationType = commitMetadata.getOperationType();
+ if (WriteOperationType.isUpsert(operationType) ||
WriteOperationType.isInsertWithoutReplace(operationType)) {
+ if (HoodieTimeline.COMMIT_ACTION.equals(instant.getAction()) &&
hoodieTable.getMetaClient().getTableType().equals(
+ HoodieTableType.COPY_ON_WRITE)) {
+ // For COW only check partitions where the write updated a file
slice (leaving behind an older version of the file slice to clean)
+ // Since some partitions may have only had new file slices created
(not leaving behind anything to clean yet)
+ return
commitMetadata.getWritePartitionPathsWithUpdatedFileGroups().stream();
+ } else if
(HoodieTimeline.DELTA_COMMIT_ACTION.equals(instant.getAction()) &&
hoodieTable.getMetaClient().getTableType().equals(
Review Comment:
needs confirm from @nsivabalan , does the Spark writer writes insert as log
to small file groups or just do a copy on write on 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]