yihua commented on code in PR #6113:
URL: https://github.com/apache/hudi/pull/6113#discussion_r933637330
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -409,8 +409,11 @@ public static HoodieData<HoodieRecord>
convertMetadataToBloomFilterRecords(
LOG.error("Failed to find path in write stat to update metadata table
" + hoodieWriteStat);
return Collections.emptyListIterator();
}
- int offset = partition.equals(NON_PARTITIONED_NAME) ?
(pathWithPartition.startsWith("/") ? 1 : 0) :
- partition.length() + 1;
+
+ // For partitioned table, "partition" contains the relative partition
path;
+ // for non-partitioned table, "partition" is empty
+ int offset = StringUtils.isNullOrEmpty(partition)
Review Comment:
Addressed in #6250. `String.replace` could be slow so I still use the
current logic. I moved it into a util method.
--
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]