voonhous commented on code in PR #19834:
URL: https://github.com/apache/hudi/pull/19834#discussion_r3949003513
##########
hudi-common/src/main/java/org/apache/hudi/metadata/stats/ValueType.java:
##########
@@ -294,7 +294,12 @@ public static ValueType fromSchema(HoodieSchema schema) {
case UUID:
return ValueType.UUID;
case UNION:
- return fromSchema(schema.getNonNullType());
+ HoodieSchema nonNullSchema = schema.getNonNullType();
+ if (nonNullSchema.getType() == HoodieSchemaType.UNION) {
Review Comment:
Done here rather than as a follow-up: `HoodieSchema#isComplexUnion()` (a
union other than the nullable wrapper of one type) replaces the three
re-checks, and `resolveUnionSchema`'s fast path uses it too. The two new throws
now carry `resolveUnionSchema`'s exact wording.
--
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]