[
https://issues.apache.org/jira/browse/AVRO-4197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan Skraba updated AVRO-4197:
------------------------------
Description:
Schema byte default values are no longer correctly encoded into the schema.
{code}
Schema.Field x = new Schema.Field(
"bytesField",
Schema.create(Schema.Type.BYTES),
"my bytes field",
new byte[] \{1, 2, 3}
);
Schema rSchema = Schema.createRecord("myRecord", "myRecord docs", "me",
false, List.of(x));
new GenericRecordBuilder(rSchema).build(); // exception thrown
{code}
was:
Schema byte default values are no longer correctly encoded into the schema.
```
Schema.Field x = new Schema.Field(
"bytesField",
Schema.create(Schema.Type.BYTES),
"my bytes field",
new byte[] \{1, 2, 3}
);
Schema rSchema = Schema.createRecord("myRecord", "myRecord docs", "me",
false, List.of(x));
new GenericRecordBuilder(rSchema).build(); // exception thrown
```
> Schema bytes defaults are broken
> --------------------------------
>
> Key: AVRO-4197
> URL: https://issues.apache.org/jira/browse/AVRO-4197
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.12.0, 1.12.1
> Reporter: Kellen Dye
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Schema byte default values are no longer correctly encoded into the schema.
> {code}
> Schema.Field x = new Schema.Field(
> "bytesField",
> Schema.create(Schema.Type.BYTES),
> "my bytes field",
> new byte[] \{1, 2, 3}
> );
> Schema rSchema = Schema.createRecord("myRecord", "myRecord docs", "me",
> false, List.of(x));
> new GenericRecordBuilder(rSchema).build(); // exception thrown
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)