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 integration test to compare datafusion-cli against psql #281

Merged
merged 1 commit into from
May 24, 2021

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented May 7, 2021

Which issue does this PR close?

We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example Closes #123 indicates that this PR will close issue #123.

Closes #.

Rationale for this change

Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.

What changes are included in this PR?

There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.

Are there any user-facing changes?

If there are user-facing changes then we may require documentation to be updated before approving the PR.

If there are any breaking changes to public APIs, please add the breaking change label.

@jimexist
Copy link
Member Author

jimexist commented May 7, 2021

this relies on #282 to be resolved first

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2021

Codecov Report

Merging #281 (87fd970) into master (6c050b8) will decrease coverage by 0.01%.
The diff coverage is 47.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #281      +/-   ##
==========================================
- Coverage   75.72%   75.71%   -0.02%     
==========================================
  Files         143      143              
  Lines       23910    23927      +17     
==========================================
+ Hits        18107    18117      +10     
- Misses       5803     5810       +7     
Impacted Files Coverage Δ
datafusion-cli/src/main.rs 0.00% <0.00%> (ø)
datafusion-cli/src/print_format.rs 84.44% <58.82%> (-5.97%) ⬇️

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 6c050b8...87fd970. Read the comment docs.

@jimexist jimexist force-pushed the add-postgres-integration-test branch 8 times, most recently from 91c0cc4 to aead845 Compare May 8, 2021 05:08
@jimexist jimexist marked this pull request as ready for review May 8, 2021 06:34
@jimexist
Copy link
Member Author

jimexist commented May 8, 2021

so far the diff isn't readable, but we'll switch to csv (#289 ) mode so that we can compare.

@jimexist jimexist changed the title add postgres comparison to python test add integration test to compare datafusion-cli against psql May 8, 2021
@jimexist jimexist force-pushed the add-postgres-integration-test branch from aead845 to 74b7132 Compare May 8, 2021 14:25
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.

This is really cool. The output of the job looks good to me

https://github.com/apache/arrow-datafusion/pull/281/checks?check_run_id=2551057118

Though as @Dandandan says it should probably error when there is a diff

name: "Integration Test"
needs: [linux-build-lib]
runs-on: ubuntu-latest
services:
Copy link
Contributor

Choose a reason for hiding this comment

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

this is cool to use a github actions service. 👍

@@ -0,0 +1,77 @@
# Licensed to the Apache Software Foundation (ASF) under one
Copy link
Contributor

Choose a reason for hiding this comment

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

This is really cool -- thank you @jimexist . It reminds me of pg_regres 👍

This script is simple enough that we can always rewrite it in Rust if we would prefer to reduce the number of languages used, but python is a good choice for scripting I think as we already have the python bindings as well as some dev scripts in python.

@jimexist
Copy link
Member Author

This is really cool. The output of the job looks good to me

https://github.com/apache/arrow-datafusion/pull/281/checks?check_run_id=2551057118

Though as @Dandandan says it should probably error when there is a diff

Will try to create a separate pull request to address the issue of turning off timing printlines

@jimexist
Copy link
Member Author

@alamb @Dandandan updated to use unittest so it's more structured

@jimexist jimexist force-pushed the add-postgres-integration-test branch 4 times, most recently from 6c4baad to f185486 Compare May 17, 2021 05:04
@jimexist jimexist force-pushed the add-postgres-integration-test branch from f185486 to 2e30324 Compare May 17, 2021 23:38
@jimexist jimexist requested review from Dandandan and alamb May 18, 2021 03:38
@jimexist jimexist force-pushed the add-postgres-integration-test branch 2 times, most recently from 6a4a68c to 5af2a1c Compare May 18, 2021 04:22
@jimexist jimexist force-pushed the add-postgres-integration-test branch 6 times, most recently from e8ea74d to b6591f5 Compare May 21, 2021 11:45
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.

LGTM 👍

@jimexist jimexist force-pushed the add-postgres-integration-test branch from b6591f5 to f0a6cb3 Compare May 23, 2021 11:04
@alamb
Copy link
Contributor

alamb commented May 24, 2021

What do we think @Dandandan -- shall we merge this PR? I feel like in general the DataFusion testing story could use some consolidation / writeup (we now have tests in sql.rs, exec.rs, and now here). However, I don't think I will have time to do anything major for a while (until I get the arrow release process running like a 🚋 )

@Dandandan
Copy link
Contributor

I think we should merge this PR!

I also feel some consolidation would be very helpful.

This PR seems to me it can help a lot with testing against PostgreSQL, something we don't do ATM.

@alamb alamb merged commit 68ad990 into apache:master May 24, 2021
@jimexist jimexist deleted the add-postgres-integration-test branch May 25, 2021 09:34
@houqp houqp added the datafusion Changes in the datafusion crate label 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants