danny0405 commented on code in PR #19198:
URL: https://github.com/apache/hudi/pull/19198#discussion_r3536691577
##########
hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java:
##########
@@ -489,27 +425,21 @@ public static String makeNativeLogFileName(String fileId,
String writeToken, Str
}
public static boolean isBaseFile(String path) {
- if (matchNativeLogFile(path).isPresent()) {
- return false;
- }
- String extension = getFileExtension(path);
- if (HoodieFileFormat.BASE_FILE_EXTENSIONS.contains(extension)) {
- return BASE_FILE_PATTERN.matcher(path).matches();
- }
- return false;
+ return FileNameParser.parseBaseFile(path)
+ .map(baseFileName ->
HoodieFileFormat.BASE_FILE_EXTENSIONS.contains(baseFileName.getFileExtension()))
Review Comment:
Updated in 123d5692d10a. I kept this aligned with the original loose FSUtils
behavior: parse the base-file name through FileNameParser, reject native log
files, then check the decoded extension against
HoodieFileFormat.BASE_FILE_EXTENSIONS. The one-underscore branch is preserved
in FileNameParser so existing external/non-generated names like file_1.parquet
continue to decode, and I added docs clarifying that this fallback exists for
historical FSUtils compatibility and is not a Hudi-writer naming pattern.
--
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]