voonhous commented on code in PR #19648:
URL: https://github.com/apache/hudi/pull/19648#discussion_r3819028760
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/PartitionPathFormatterBase.java:
##########
@@ -62,11 +62,11 @@ public final S combine(List<String> partitionPathFields,
Object... partitionPath
// Avoid creating [[StringBuilder]] in case there's just one
partition-path part,
// and Hive-style of partitioning is not required
if (!useHiveStylePartitioning && partitionPathParts.length == 1) {
- if (slashSeparatedDatePartitioning) {
- return ((S) ((String) toString(partitionPathParts[0])).replace('-',
'/'));
- } else {
- return tryEncode(handleEmpty(toString(partitionPathParts[0])));
- }
+ S partitionPathPart =
tryEncode(handleEmpty(toString(partitionPathParts[0])));
+ // NOTE: Slash-separated date partitioning only kicks in for a table
partitioned by a single
Review Comment:
One correction to the amended NOTE: the multi-field `CustomKeyGenerator`
layout it describes cannot be read back. `date:simple,city:simple` + slash
writes `2026/01/05/san/francisco` (all three paths agree), but
`HoodieSparkUtils#doParsePartitionColumnValues` returns a length-0 array for it
(5 fragments vs 2 partition columns, no `col=` prefix), so
`BaseHoodieTableFileIndex.java:477` throws `HoodieException` on every read
under the default lazy listing.
Ask: reword the last sentence of the NOTE to say the resulting layout is not
readable and cite #19666, and widen #19666 to explicitly cover
`CustomKeyGenerator` (a partition-field-count check at table creation still
catches its per-field sub-keygens).
--
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]