Skip to content

fix: Be more selective when choosing an union when serializing bytes with schema - #421

Merged
Kriskras99 merged 2 commits into
mainfrom
fix/union_select
Jan 21, 2026
Merged

Kriskras99 merged 2 commits into
mainfrom
fix/union_select

Conversation

@Kriskras99

Copy link
Copy Markdown
Contributor

Without my changes the test would fail with:

    Backtrace omitted. Run with RUST_BACKTRACE=1 to display it.
    Run with RUST_BACKTRACE=full to include source snippets.

    The application panicked (crashed).
      apache_avro::error::Error: Error { details: Failed to serialize value of type bytes using schema Fixed(FixedSchema { name: Name { name: "fixed4", namespace: None }, aliases: None, doc: None, size: 4, default: None, attributes: {} }): 456789ab. Cause: Fixed schema size (4) does not match the value length (8) }
    in avro/src/serde/ser_schema.rs, line 3578
    thread: serde::ser_schema::tests::avro_rs_421_serialize_bytes_union_of_fixed

@Kriskras99
Kriskras99 merged commit 9836cec into main Jan 21, 2026
@Kriskras99
Kriskras99 deleted the fix/union_select branch January 21, 2026 14:27
@martin-g martin-g added this to the 0.22.0 milestone Jan 27, 2026
@Kriskras99 Kriskras99 mentioned this pull request Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants