Skip to content

GH-3792: Prefer exact Avro field names over aliases - #3822

Closed
zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/issue-3792-avro-alias-priority
Closed

zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/issue-3792-avro-alias-priority

Conversation

@zhangxinyao88

Copy link
Copy Markdown

Rationale for this change

The compatibility converter continued searching aliases after finding an exact field match. A Parquet column could therefore be materialized into a different Avro field whose alias had the same name.

What changes are included in this PR?

Return an exact Avro field match before checking aliases in AvroIndexedRecordConverter. Add coverage for exact-name precedence and alias fallback.

Are these changes tested?

  • mvn -pl parquet-avro test
  • mvn spotless:check

Are there any user-facing changes?

Fixes incorrect field mapping when a reader schema contains an exact field name and another field with that name as an alias.

Closes #3792

@zhangxinyao88
zhangxinyao88 marked this pull request as ready for review September 27, 2026 00:42
@zhangxinyao88

Copy link
Copy Markdown
Author

Closing in favor of #3793, which already contains the same fix and end-to-end coverage for both converter paths. I missed the linked PR when opening this one.

@zhangxinyao88
zhangxinyao88 deleted the codex/issue-3792-avro-alias-priority branch September 30, 2026 02:43
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.

AvroIndexedRecordConverter resolves aliases before the exact field name

1 participant