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

Fix empty Schema::metadata deserialization error #260

Merged
merged 2 commits into from
May 7, 2021

Conversation

hulunbier
Copy link
Contributor

Hope this fixes issue #241

Which issue does this PR close?

Closes #241

Rationale for this change

De-serializing schema with empty metadata gives us a "missing field metadata..." error, as stated in #241. returns an empty HashMap may be a better choice.

What changes are included in this PR?

Annotates field Schema::metadata with #[serde(default)], which will give us a empty HashMap if metadata is empty.

Are there any user-facing changes?

none.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @hulunbier -- looks good to me. @nevi-me any concerns about this

arrow/src/datatypes/schema.rs Show resolved Hide resolved
Copy link
Contributor

@nevi-me nevi-me left a comment

Choose a reason for hiding this comment

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

No concerns @alamb, looks good. Thanks @hulunbier

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.

schema: missing field metadata when deserialize
3 participants