Skip to content

Fix arrow-json writer empty#6614

Merged
tustvold merged 1 commit into
apache:masterfrom
gwik:empty-writer
Oct 23, 2024
Merged

Fix arrow-json writer empty#6614
tustvold merged 1 commit into
apache:masterfrom
gwik:empty-writer

Conversation

@gwik

@gwik gwik commented Oct 22, 2024

Copy link
Copy Markdown
Contributor

The Writer output with the ArrayJson formatter was empty when no record were in the output (no write or empty batch write). It should output an empty JSON array [] instead.

Closes #6613

The Writer output with the ArrayJson formatter was empty
when no record were in the output (no write or empty batch write).
It should output an empty JSON array `[]` instead.
@github-actions github-actions Bot added the arrow Changes to the arrow crate label Oct 22, 2024

@findepi findepi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding new tests!

@tustvold tustvold left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you

@tustvold tustvold merged commit f86668c into apache:master Oct 23, 2024
@jackkleeman

Copy link
Copy Markdown

Hey folks, I'm not sure if this should have gone out as a minor release, as it will break anyone who assumes that there is no output if there were no rows. We were working around the lack of output by adding the [] ourselves. Super glad we don't have to do that any more, but sadly Cargo automatically bumped the minor version and now we see [][] :D

@tustvold

Copy link
Copy Markdown
Contributor

Apologies that this broke your workflow, I viewed this a bug fix and therefore it was appropriate to roll out in a non-breaking release.

@jackkleeman

Copy link
Copy Markdown

ok, makes sense to me!

@jackkleeman

Copy link
Copy Markdown

https://xkcd.com/1172/

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.

Array writer output empty when no record is written

4 participants