hudi-agent commented on code in PR #19710:
URL: https://github.com/apache/hudi/pull/19710#discussion_r3832732842
##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/SlashEncodedDayPartitionValueExtractor.java:
##########
@@ -65,4 +73,11 @@ public List<String> extractPartitionValuesInPath(String
partitionPath) {
return Collections.singletonList(dateTime.format(getDtfOut()));
}
+
+ private static boolean isDefaultPartition(String partitionPath) {
+ // a Hive-style directory carries the column name, e.g.
"datestr=__HIVE_DEFAULT_PARTITION__"
+ int separator = partitionPath.indexOf('=');
+ String value = separator < 0 ? partitionPath :
partitionPath.substring(separator + 1);
Review Comment:
🤖 This matches on `DEFAULT_PARTITION_PATH` (`__HIVE_DEFAULT_PARTITION__`),
but `PartitionPathEncodeUtils` also defines `DEPRECATED_DEFAULT_PARTITION_PATH`
(`"default"`) for older tables. A slash table written before the marker changed
would land nulls in a single-segment `default` dir and still hit the 3-segment
check. Is that legacy case out of scope here, or worth matching too?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/SlashEncodedDayPartitionValueExtractor.java:
##########
@@ -65,4 +73,11 @@ public List<String> extractPartitionValuesInPath(String
partitionPath) {
return Collections.singletonList(dateTime.format(getDtfOut()));
}
+
+ private static boolean isDefaultPartition(String partitionPath) {
Review Comment:
🤖 nit: `isDefaultPartition` is identical in both
`SlashEncodedDayPartitionValueExtractor` and
`SlashEncodedHourPartitionValueExtractor` — could it live in a shared base
class or a small `PartitionValueExtractorUtils` helper so the two
implementations stay in sync?
<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]