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

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

Closed
Jefffrey opened this issue Nov 12, 2023 · 3 comments · Fixed by #5133
Closed

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

Jefffrey opened this issue Nov 12, 2023 · 3 comments · Fixed by #5133
Labels
arrow Changes to the arrow crate bug object-store Object Store Interface

Comments

@Jefffrey
Copy link
Contributor

Jefffrey commented Nov 12, 2023

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

See note here:

// NOTE: The last value should technically be {"list": [null]} but it appears
// that implementations differ on the treatment of a null struct.
// It would be more accurate to return a null struct, so this can be done
// as a follow up.
assert_json_eq(
&buf,
r#"{"list":[{"ints":1}]}
{"list":[{}]}
{"list":[]}
{}
{"list":[{}]}
{"list":[{}]}
"#,
);

Describe the solution you'd like

When writing a struct array, if there is a null then should write null instead of {}

Describe alternatives you've considered

Keep behaviour as is, writing {} for null entry in struct array. Remove above note in code and clearly document this is expected behaviour.

Additional context

@Jefffrey Jefffrey added the enhancement Any new improvement worthy of a entry in the changelog label Nov 12, 2023
@tustvold tustvold added bug and removed enhancement Any new improvement worthy of a entry in the changelog labels Nov 12, 2023
@tustvold
Copy link
Contributor

I think this is actually just a bug

@tustvold
Copy link
Contributor

tustvold commented Jan 5, 2024

label_issue.py automatically added labels {'arrow'} from #5133

@tustvold tustvold added arrow Changes to the arrow crate object-store Object Store Interface labels Jan 5, 2024
@tustvold
Copy link
Contributor

tustvold commented Jan 5, 2024

label_issue.py automatically added labels {'object-store'} from #5065

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 bug object-store Object Store Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants