Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LI] Make MergeHiveSchemaWithAvro not reordering avro optional union … #153

Merged

Conversation

rzhang10
Copy link
Member

…field when it's it's merging a hive primitive with an avro optional union

This patch fixes a issue when a table's avro schema exhibit this pattern: it has a record field which has a inner optional field with null as the second element, and it has a default value at the record level with a key-value pair for that inner optional field, then the current MergeHiveSchemaWithAvro will reorder the null to be the first element of the optional field schema, making the record-level default validation fail. This patch will retain the positional of the null element in the avro optional field its original position, thus fixing the bug.

…field when it's it's merging a hive primitive with an avro optional union
@github-actions github-actions bot added the CORE label Mar 11, 2024
Copy link
Contributor

@770120041 770120041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rzhang10 rzhang10 merged commit d581a69 into li-0.11.x Mar 15, 2024
3 checks passed
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.

2 participants