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

refactor: split relation of planner into one part. #4829

Merged
merged 4 commits into from
Jan 7, 2023

Conversation

jackwener
Copy link
Member

@jackwener jackwener commented Jan 6, 2023

Which issue does this PR close?

Closes #4392.

FOLLOWUP #4783

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the sql SQL Planner label Jan 6, 2023
@jackwener
Copy link
Member Author

@alamb @liukun4515 PTAL

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 great to me @jackwener -- I verified that just code was moved and that no tests were changed

Thank you so much

I think this PR is relatively uncontroversial and is likely to accumulate / cause conflicts, but I plan to wait to merge until @andygrove cuts the release #4776 hopefully later today to avoid introducing last minute churn.

@alamb
Copy link
Contributor

alamb commented Jan 6, 2023

BTW @jackwener another thing I noticed was that the sql planner tests could probably be put into you plan to move the tests into something like datafusion/sql/test/planning.rs or whatnot to make the planner.rs module even smaller

https://github.com/apache/arrow-datafusion/blob/169b5228800f991be913b10ffdfd161e2cbc7baf/datafusion/sql/src/planner.rs#L2021-L2032

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jan 7, 2023
@liukun4515
Copy link
Contributor

I will take a look later

@jackwener
Copy link
Member Author

BTW @jackwener another thing I noticed was that the sql planner tests could probably be put into you plan to move the tests into something like datafusion/sql/test/planning.rs or whatnot to make the planner.rs module even smaller

https://github.com/apache/arrow-datafusion/blob/169b5228800f991be913b10ffdfd161e2cbc7baf/datafusion/sql/src/planner.rs#L2021-L2032

Thanks @alamb, I have finished it.

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.

Thanks again @jackwener

I double checked to make sure the tests still run now that they are moved to a different module:

https://github.com/apache/arrow-datafusion/actions/runs/3862329303/jobs/6583883751#step:7:3200

...
     Running tests/integration_test.rs (target/debug/deps/integration_test-02f1355111e126c1)

running 231 tests
test aggregate_with_cube ... ok
test aggregate_with_grouping_sets ... ok
test aggregate_with_rollup_with_grouping ... ok
test aggregate_with_rollup ... ok
test approx_median_window ... ok
test boolean_literal_in_condition_expression ... ok
test cast_from_subquery ... ok
test create_external_table_csv ... ok
test cast_to_invalid_decimal_type ... ok
test create_external_table_custom ... ok
test create_external_table_csv_no_schema ... ok
test create_external_table_parquet ... ok
test create_external_table_parquet_no_schema ... ok
test create_external_table_with_compression_type ... ok
test cte_unbalanced_number_of_columns ... ok
test cross_join_not_to_inner_join ... ok
...

Since this PR has a large potential for conflicts and I think it is uncontroversial as it is mechanical (it moves code around and we can always move it back if that is deired) I am going to merge it and I think we can deal with follow up

Thanks @liukun4515

@alamb alamb merged commit 3cc607d into apache:master Jan 7, 2023
@ursabot
Copy link

ursabot commented Jan 7, 2023

Benchmark runs are scheduled for baseline = 8c1fb87 and contender = 3cc607d. 3cc607d is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: split the SQL planner into smaller modules
4 participants