voonhous commented on code in PR #17535:
URL: https://github.com/apache/hudi/pull/17535#discussion_r2608911723
##########
hudi-common/src/main/java/org/apache/hudi/common/table/PartitionPathParser.java:
##########
@@ -158,19 +156,15 @@ private static Object inferDateValue(
throw new IllegalArgumentException(
"Unknown date format for partition path: " + partitionPath);
}
- if (fieldSchema.getLogicalType() instanceof LogicalTypes.Date) {
+ if (fieldSchema.getType() == HoodieSchemaType.DATE) {
return Date.valueOf(time.toLocalDate());
}
return Timestamp.from(time.toInstant(ZoneOffset.UTC));
}
- private static boolean isTimeBasedLogicalType(LogicalType logicalType) {
- return logicalType instanceof LogicalTypes.Date
- || logicalType instanceof LogicalTypes.TimestampMillis
- || logicalType instanceof LogicalTypes.TimestampMicros
- || logicalType instanceof LogicalTypes.TimeMillis
- || logicalType instanceof LogicalTypes.TimeMicros
- || logicalType instanceof LogicalTypes.LocalTimestampMicros
- || logicalType instanceof LogicalTypes.LocalTimestampMillis;
+ private static boolean isTimeBasedLogicalType(HoodieSchemaType logicalType) {
Review Comment:
Will modify, once your PR is merged, I'll prioritise your changes over mine
for this.
--
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]