lw309637554 commented on a change in pull request #2275:
URL: https://github.com/apache/hudi/pull/2275#discussion_r548353338
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/UpsertPartitioner.java
##########
@@ -140,11 +154,15 @@ private void assignInserts(WorkloadProfile profile,
HoodieEngineContext context)
Map<String, List<SmallFile>> partitionSmallFilesMap =
getSmallFilesForPartitions(new ArrayList<String>(partitionPaths),
context);
+ Map<String, Set<String>> partitionPathToPendingClusteringFileGroupsId =
getPartitionPathToPendingClusteringFileGroupsId();
+
for (String partitionPath : partitionPaths) {
WorkloadStat pStat = profile.getWorkloadStat(partitionPath);
if (pStat.getNumInserts() > 0) {
+ // exclude the small file in pending clustering, because in pending
clustering file not support update now.
+ Set<String> inPendingClusteringFileId =
partitionPathToPendingClusteringFileGroupsId.getOrDefault(partitionPath,
Collections.emptySet());
+ List<SmallFile> smallFiles =
UpdateStrategy.filterSmallFiles(inPendingClusteringFileId,
partitionSmallFilesMap.get(partitionPath));
Review comment:
thanks
1、"why is this a static method?": because transform updatestrategy into
UpsertPartitioner may be modify the UpsertPartitioner construct. I will add
updatestrategy param to UpsertPartitioner construct
2、" If clustering is not enabled on a table, this filtering is expensive.
Should we add 'default' strategy for that case? The default strategy would not
do any filtering." make sense
----------------------------------------------------------------
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]