danny0405 commented on code in PR #9811:
URL: https://github.com/apache/hudi/pull/9811#discussion_r1342241808
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkInsertOverwriteCommitActionExecutor.java:
##########
@@ -78,8 +80,17 @@ protected String getCommitActionType() {
@Override
protected Map<String, List<String>>
getPartitionToReplacedFileIds(HoodieWriteMetadata<HoodieData<WriteStatus>>
writeMetadata) {
- return
HoodieJavaPairRDD.getJavaPairRDD(writeMetadata.getWriteStatuses().map(status ->
status.getStat().getPartitionPath()).distinct().mapToPair(partitionPath ->
- Pair.of(partitionPath,
getAllExistingFileIds(partitionPath)))).collectAsMap();
+ if (writeMetadata.getWriteStatuses().isEmpty()) {
+ String staticOverwritePartition =
config.getStringOrDefault(HoodieInternalConfig.STATIC_OVERWRITE_PARTITION_PATHS);
+ if (staticOverwritePartition == null ||
staticOverwritePartition.isEmpty()) {
+ return Collections.emptyMap();
Review Comment:
You can use `StringUtils.isNullOrEmpty`
--
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]