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

minor: consolidate unparser integration tests #10736

Merged
merged 5 commits into from
Jun 1, 2024

Conversation

devinjdangelo
Copy link
Contributor

@devinjdangelo devinjdangelo commented May 31, 2024

Which issue does this PR close?

Closes #10635

Rationale for this change

Moving plan to sql related integration tests to a dedicated integration test mod.

What changes are included in this PR?

  • Created datafusion/sql/tests/plan_to_sql.rs
  • Moved all unparser/plan_to_sql related integration tests to new file
  • Created datafusion/sql/tests/common/mod.rs and moved common utilities there

Are these changes tested?

Just reorganizing existing tests.

Are there any user-facing changes?

No

@github-actions github-actions bot added the sql SQL Planner label May 31, 2024
@devinjdangelo devinjdangelo changed the title minor: consolidate unparser tests minor: consolidate unparser integration tests May 31, 2024
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 good to me -- thank you @devinjdangelo

What would you think about using the same test binary (rather than making a new one, which is like 100MB or something last I checked)?

To do so, I think we could do something like

  1. move datafusion/sql/tests/plan_to_sql.rs to datafusion/sql/tests/cases/plan_to_sql.rs
  2. Add mod cases to datafusion/sql/tests/sql_integration.rs

We could do it as a follow on PR (or never) too

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.

I ran the test manually just to make sure the tests are running and they are! Thanks again @devinjdangelo

(venv) andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion2$ cargo test --test sql_integration
...

test cases::plan_to_sql::roundtrip_statement ... ok

@alamb alamb merged commit 71a99b8 into apache:main Jun 1, 2024
23 checks passed
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* consolidate unparser integration tests

* add license to new files

* surpress dead code warnings

* run as one integration test binary

* add license
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate tests for unparser / plan to sql to make them easier to find
2 participants