You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Ryan Skraba (Jira)" <ji...@apache.org> on 2025/12/04 19:00:00 UTC

[jira] [Resolved] (AVRO-4197) Schema bytes defaults are broken

     [ https://issues.apache.org/jira/browse/AVRO-4197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Skraba resolved AVRO-4197.
-------------------------------
    Fix Version/s: 1.11.6
                   1.12.2
       Resolution: Fixed

> 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
>            Assignee: Kellen Dye
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.6, 1.12.2
>
>          Time Spent: 2h 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)