voonhous commented on code in PR #19648:
URL: https://github.com/apache/hudi/pull/19648#discussion_r3813358360


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/PartitionPathFormatterBase.java:
##########
@@ -75,15 +75,11 @@ public final S combine(List<String> partitionPathFields, 
Object... partitionPath
 
       if (useHiveStylePartitioning) {

Review Comment:
   Strengthening this: "unreachable" holds only for SQL DDL. The guard is 
`HoodieCatalogTable#extraTableConfig:296-300` and inspects `sqlOptions` only; 
`HoodieWriterUtils`, `HoodieSparkSqlWriter` and `BaseKeyGenerator` have no 
equivalent, so `df.write.format("hudi")` and HoodieStreamer accept 
`hive_style_partitioning=true` + `slash.separated.date.partitioning=true`. With 
a single partition field that table gets `date_col=2026/01/05` from the Avro 
path and `date_col=2026-01-05` from the InternalRow path, and both are live 
(`HoodieCreateRecordUtils` AVRO vs SPARK record type, plus the row writer). The 
Avro layout is also not readable: 
`HoodieSparkUtils.doParsePartitionColumnValues:306-312` takes the `date_col=` 
prefix branch and never restores `/` -> `-`. Agree with not mirroring Avro.
   
   **Ask:** drop the "this combination is unreachable" sentence from the 
`testHiveStylePartitioningTakesPrecedence` comment 
(`TestPartitionPathFormatter.java:98-102`) -- it pins a non-discriminating 
value and will mislead the next reader; either delete that test or keep it with 
the comment corrected. The all-write-paths mutual-exclusion check (e.g. 
`HoodieWriterUtils.validateTableConfig`) can be here or a linked follow-up.



-- 
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]

Reply via email to