Daniel Robert created AVRO-3132:
-----------------------------------
Summary: allow ability to fail codegen on invalid logic tpye
Key: AVRO-3132
URL: https://issues.apache.org/jira/browse/AVRO-3132
Project: Apache Avro
Issue Type: Bug
Components: java, tools
Affects Versions: 1.10.2
Reporter: Daniel Robert
I accidentally had a field in an {{.avsc}} file that looked like this:
{code:json}
{
"name": "date",
"type": [
"null",
{
"type": "long",
"logicalType": "date"
}
],
{code}
Running the avro-maven-plugin's {{schema}} goal, I see this warning:
bq. Ignoring invalid logical type for name: date
The 'fix' was to change the type from "long" to "int", but two things surprised
me here:
1. this continued on creating a logical type of `timestamp-millis` (I think,
resulting java data type was java.time.Instant)
2. there is no way I can see to fail on warning
Ideally I'd want to be able to configure the codegen task to fail if the type
is not defined correctly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)