Skip to content

Conversation

@Jefffrey
Copy link
Contributor

Which issue does this PR close?

Closes apache/arrow-rs-object-store#109

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?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 28, 2023
Copy link
Contributor

@tustvold tustvold left a 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

let json_values = jsonmaps
.into_iter()
.map(|maybe_map| {
if let Some(map) = maybe_map {
Copy link
Contributor

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

Copy link
Contributor Author

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

Jefffrey and others added 2 commits November 29, 2023 07:46
Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON writer - write null structs as null, instead of struct with nulls

2 participants