-
Notifications
You must be signed in to change notification settings - Fork 831
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
JSON: write struct array nulls as null #5133
JSON: write struct array nulls as null #5133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, just some minor nits
arrow-json/src/writer.rs
Outdated
let json_values = jsonmaps | ||
.into_iter() | ||
.map(|maybe_map| { | ||
if let Some(map) = maybe_map { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A match might be nicer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored to use map
and unwrap_or
Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
Which issue does this PR close?
Closes #5066
Rationale for this change
What changes are included in this PR?
Nulls in struct arrays are written as
null
in JSON, where previously was written as{}
(or filled with nulls for the keys if explicit nulls are written)Are there any user-facing changes?