voonhous commented on code in PR #14311:
URL: https://github.com/apache/hudi/pull/14311#discussion_r2568486426
##########
hudi-common/src/main/java/org/apache/hudi/stats/ValueType.java:
##########
@@ -244,77 +243,70 @@ public static ValueType
fromParquetPrimitiveType(PrimitiveType primitiveType) {
}
}
- public static ValueType fromSchema(Schema schema) {
- switch (schema.getType()) {
+ /**
+ * Infers ValueType from HoodieSchema for type inference in column
statistics.
+ * Leverages specialized HoodieSchema subclasses to determine the
appropriate ValueType.
+ *
+ * @param schema the HoodieSchema to infer type from
+ * @return the corresponding ValueType
+ * @throws IllegalArgumentException if the schema type is not supported
+ * @since 1.2.0
+ */
+ public static ValueType fromSchema(HoodieSchema schema) {
+ // Handle logical types first using instanceof checks on specialized
classes
+ if (schema instanceof HoodieSchema.Decimal) {
Review Comment:
Done
--
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]