yihua commented on code in PR #6250:
URL: https://github.com/apache/hudi/pull/6250#discussion_r933697289
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -325,16 +325,13 @@ public static List<HoodieRecord>
convertMetadataToFilesPartitionRecords(HoodieCo
return map;
}
- int offset = partition.equals(NON_PARTITIONED_NAME)
- ? (pathWithPartition.startsWith("/") ? 1 : 0)
- : partition.length() + 1;
- String filename = pathWithPartition.substring(offset);
+ String fileName =
FSUtils.getFileName(pathWithPartition, partitionStatName);
Review Comment:
We cannot use `partition` here which is generated by
`getPartitionIdentifier(partitionStatName)`, changing the empty relative
partition path to `.` partition identifier. `getFileName()` expects plain
relative partition path, instead of the partition identifier used in the
metadata table.
--
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]