Skip to content

AVRO-4359: [C] Keep field and enum defaults in parsed schemas - #4032

Open
fabiocfabini wants to merge 1 commit into
apache:mainfrom
fabiocfabini:avro-4359-keep-schema-defaults
Open

fabiocfabini wants to merge 1 commit into
apache:mainfrom
fabiocfabini:avro-4359-keep-schema-defaults

Conversation

@fabiocfabini

Copy link
Copy Markdown
Contributor

What is the purpose of the change

The C SDK dropped the 'default' entries in the schema for records and enums. This pull request propagates the "default" field in the schema struct and rejects an enum default that isn't one of the enum's symbols.

Verifying this change

This change added tests and can be verified as follows:

  • Added test_avro_4359, that checks that field and enum defaults are present in the JSON written for a parsed and a copied schema.
  • Added the schema_tests/fail/enum_default_not_a_symbol fixture.
  • ./build.sh clean test passes in lang/c and valgrind checks.

Documentation

  • Does this pull request introduce a new feature? no

@github-actions github-actions Bot added the C label Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant