David Maughan created AVRO-2185:
-----------------------------------
Summary: Allow rethrowing of LogicalType validation exceptions
when parsing Schemas
Key: AVRO-2185
URL: https://issues.apache.org/jira/browse/AVRO-2185
Project: Avro
Issue Type: Improvement
Components: java
Affects Versions: 1.8.2
Reporter: David Maughan
Currently if a schema has an invalid logicalType, it does not fail when being
parsed. Only a warning is logged. It would be useful to allow rethrowing of any
(the first) validation exception.
{{LogicalTypes.fromSchemaImpl}} allows rethrowing of exceptions but
{{Schema.parse}} is hardcoded to use the non-rethrowing version
({{LogicalTypes.fromSchemaIgnoreInvalid}} - incidentally I've found no uses of
the rethrowing equivalent - {{LogicalTypes.fromSchema}}).
Unless there's a better Idea, I'm proposing to add a method to
{{Schema.Parser}} to allow rethrowing, much like {{setValidateDefaults}} and
{{setValidate}}. Perhaps {{setValidateLogicalTypes}}?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)