hudi-agent commented on code in PR #19648:
URL: https://github.com/apache/hudi/pull/19648#discussion_r3822434720


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/PartitionPathFormatterBase.java:
##########
@@ -62,11 +62,28 @@ 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: For [[SimpleKeyGenerator]]/[[ComplexKeyGenerator]] 
slash-separated date partitioning

Review Comment:
   🤖 nit: this ~20-line NOTE block inline in the hot `combine()` path is a lot 
to read past. Could you move the rationale (the leading-dash / cross-generator 
explanation) into the javadoc of `replaceDashesWithSlashes`/`startsWithDash` 
and leave just a one-line pointer here?
   
   <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]

Reply via email to