danny0405 commented on code in PR #10778:
URL: https://github.com/apache/hudi/pull/10778#discussion_r1515461548
##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaUtils.java:
##########
@@ -349,14 +349,14 @@ public static Schema resolveNullableSchema(Schema schema)
{
List<Schema> innerTypes = schema.getTypes();
if (innerTypes.size() != 2) {
- throw new AvroRuntimeException(
+ throw new HoodieSchemaException(
String.format("Unsupported Avro UNION type %s: Only UNION of a null
type and a non-null type is supported", schema));
}
Schema firstInnerType = innerTypes.get(0);
Schema secondInnerType = innerTypes.get(1);
if ((firstInnerType.getType() != Schema.Type.NULL &&
secondInnerType.getType() != Schema.Type.NULL)
|| (firstInnerType.getType() == Schema.Type.NULL &&
secondInnerType.getType() == Schema.Type.NULL)) {
- throw new AvroRuntimeException(
+ throw new HoodieSchemaException(
Review Comment:
If it is only related with avro type conversion, I prefer to keep it as
`AvroRuntimeException`.
--
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]