SEPURI-SAI-KRISHNA commented on code in PR #19648:
URL: https://github.com/apache/hudi/pull/19648#discussion_r3836422893
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/StringPartitionPathFormatter.java:
##########
@@ -56,6 +56,16 @@ protected String handleEmpty(String partitionPathPart) {
}
}
+ @Override
+ protected String replaceDashesWithSlashes(String partitionPathPart) {
+ return partitionPathPart.replace('-', '/');
+ }
+
+ @Override
+ protected boolean startsWithDash(String partitionPathPart) {
+ return !partitionPathPart.isEmpty() && partitionPathPart.charAt(0) == '-';
Review Comment:
Done, though by a different route than suggested. The check moved to
`KeyGenUtils#hasPathBreakingDash` so that the Avro write path and both
formatters share one definition, and it now covers trailing and doubled dashes
as well as leading ones -- all three produce a partition path that does not
survive the round trip back from storage.
`StringPartitionPathFormatter` delegates to it, so the `charAt(0) == '-'`
form you flagged is gone.
--
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]