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

add support for ndjson for datafusion-cli #427

Merged
merged 1 commit into from
May 27, 2021
Merged

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented May 26, 2021

Which issue does this PR close?

add support for ndjson for datafusion-cli

Closes #.

Rationale for this change

add support for ndjson for datafusion-cli

What changes are included in this PR?

Are there any user-facing changes?

❯ cargo run --bin datafusion-cli -q -- -f integration-tests/create_test_table.sql -f integration-tests/sqls/simple_group_by.sql -q --format ndjson
{"c2":1,"sum_c3":367,"avg_c3":16.681818181818183,"max_c3":125,"min_c3":-99,"count_c3":22}
{"c2":2,"sum_c3":184,"avg_c3":8.363636363636363,"max_c3":122,"min_c3":-117,"count_c3":22}
{"c2":3,"sum_c3":395,"avg_c3":20.789473684210527,"max_c3":123,"min_c3":-101,"count_c3":19}
{"c2":4,"sum_c3":29,"avg_c3":1.2608695652173914,"max_c3":123,"min_c3":-117,"count_c3":23}
{"c2":5,"sum_c3":-194,"avg_c3":-13.857142857142858,"max_c3":118,"min_c3":-101,"count_c3":14}

@codecov-commenter
Copy link

Codecov Report

Merging #427 (09662dc) into master (3593d1f) will decrease coverage by 0.01%.
The diff coverage is 73.68%.

❗ Current head 09662dc differs from pull request most recent head 4130712. Consider uploading reports for the commit 4130712 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #427      +/-   ##
==========================================
- Coverage   74.85%   74.84%   -0.02%     
==========================================
  Files         146      146              
  Lines       24565    24571       +6     
==========================================
+ Hits        18387    18389       +2     
- Misses       6178     6182       +4     
Impacted Files Coverage Δ
datafusion-cli/src/print_format.rs 81.25% <73.68%> (-3.20%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3593d1f...4130712. Read the comment docs.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like a great change @jimexist -- FYI @andygrove

Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@alamb
Copy link
Contributor

alamb commented May 27, 2021

Thanks @jimexist !

@alamb alamb merged commit bc1385d into apache:master May 27, 2021
@jimexist jimexist deleted the add-ndjson branch May 28, 2021 12:45
@houqp houqp added datafusion Changes in the datafusion crate enhancement New feature or request labels Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants