hudi-agent commented on code in PR #19751:
URL: https://github.com/apache/hudi/pull/19751#discussion_r3863778265
##########
hudi-common/src/main/java/org/apache/hudi/common/util/PartitionPathEncodeUtils.java:
##########
@@ -118,10 +122,26 @@ private static String doEscape(String path,
Function<Character,Boolean> needsEsc
return sb.toString();
}
+ /**
+ * Escapes a filename derived from a partition path for use in
metadata-table file ids.
+ * For a single-level hive-style segment (like "fare.currency=USD"), dots in
the column name
+ * (before the first '=') are escaped, since a literal dot there makes the
metadata log file
+ * name unparseable by the log-file pattern. Dots in the partition value
(after '=') are left
+ * as-is. Partition values that contain dots, and nested or non-hive-style
dotted paths, are
+ * not handled here.
+ */
public static String escapeFileName(String filename) {
if (filename == null || filename.length() == 0) {
return filename;
}
+ int eqIdx = filename.indexOf('=');
Review Comment:
🤖 nit: `value` suggests just the partition value, but this string actually
starts with `=`. Could you rename it to something like `eqAndValue` or `rest`
to make the `// includes '='` comment unnecessary?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]