Skip to content

AVRO-4358: [C] Match enum symbols by name in schema resolution - #4033

Open
fabiocfabini wants to merge 1 commit into
apache:mainfrom
fabiocfabini:avro-4358-enum-resolution-by-name
Open

fabiocfabini wants to merge 1 commit into
apache:mainfrom
fabiocfabini:avro-4358-enum-resolution-by-name

Conversation

@fabiocfabini

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Schema resolution in the C SDK (reagrding enums) copied the writer's enum index into the reader's value, so reordered symbols were read as the wrong symbol and missing symbols from the reader produced out-of-range values. This pull request matches enum symbols by name and fails when reading a symbol the reader doesn't have.

Verifying this change

This change added tests and can be verified as follows:

  • Added test_avro_4358, that checks the enum schema resolution works even with different order in enum symbols. Also checks for failure when reading a symbol the reader does not have.
  • ./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