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

Use Arrows for_json for JSON output #330

Merged
merged 6 commits into from
Oct 16, 2019
Merged

Use Arrows for_json for JSON output #330

merged 6 commits into from
Oct 16, 2019

Conversation

rbialon
Copy link
Contributor

@rbialon rbialon commented Oct 16, 2019

Arrow provides a for_json() function encoding Arrow objects for JSON output.
Using the default-parameter of json.dumps(), this function is invoked on Arrow objects which can then be encoded for JSON output.

This PR fixes #329

Arrow provides a `for_json()` function encoding Arrow objects for JSON
output. Using the default-parameter of `json.dumps()`, this function is
invoked on Arrow objects which can then be encoded for JSON output.
Using Python 3.x, builtins have to be imported, whereas in Python 2.x
they are available in the namespace
jmaupetit
jmaupetit previously approved these changes Oct 16, 2019
Copy link
Contributor

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

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

Thanks @rbialon ! 🙏

Two more things:

  1. Can you please update the CHANGELOG to mention your fix?
  2. Can you add basic tests for the json_arrow_encoder?

@rbialon
Copy link
Contributor Author

rbialon commented Oct 16, 2019

Sure, I added a short description to the changelog and provided some basic tests.

Let me know if the tests should cover more cases, I provided ones for the two that came to my mind.

@rbialon rbialon removed their assignment Oct 16, 2019
@rbialon rbialon requested a review from jmaupetit October 16, 2019 10:30
Copy link
Contributor

@jmaupetit jmaupetit 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 🎉

@jmaupetit jmaupetit merged commit f46a6ae into jazzband:master Oct 16, 2019
davidag pushed a commit to davidag/Watson that referenced this pull request Oct 16, 2019
Arrow provides a `for_json()` function encoding Arrow objects for JSON
output. Using the default-parameter of `json.dumps()`, this function is
invoked on Arrow objects which can then be encoded for JSON output.

Reference PR: jazzband#330

Fix jazzband#329
@rbialon rbialon deleted the fix-arrow-json-encoding branch October 17, 2019 07:13
ericguirbal added a commit to ericguirbal/Watson that referenced this pull request Oct 19, 2019
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329).
ericguirbal added a commit to ericguirbal/Watson that referenced this pull request Oct 19, 2019
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329).
ericguirbal added a commit to ericguirbal/Watson that referenced this pull request Oct 19, 2019
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329).
jmaupetit pushed a commit that referenced this pull request Oct 21, 2019
PR #330 forgot to fix the aggregate command (see bug #329).

Reference PR #331
davidag pushed a commit to davidag/Watson that referenced this pull request Oct 21, 2019
PR jazzband#330 forgot to fix the aggregate command (see bug
jazzband#329).

Reference PR jazzband#331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The report and aggregate commands with --json option don't work any more
2 participants