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

Reduce dependencies of datafusion-sql crate #3566

Merged
merged 7 commits into from
Sep 21, 2022
Merged

Reduce dependencies of datafusion-sql crate #3566

merged 7 commits into from
Sep 21, 2022

Conversation

mbrobbel
Copy link
Contributor

Which issue does this PR close?

This doesn't close, but contributes to the changes being worked on in #1750.

Rationale for this change

By disabling features and removing unused dependencies the build time of those crates is reduced.

What changes are included in this PR?

This PR removes some unused direct dependencies of the sql, common and expr crates, and disables unused features.

Are there any user-facing changes?

No

@github-actions github-actions bot added logical-expr Logical plan and expressions sql SQL Planner labels Sep 21, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #3566 (f522f88) into master (81b5794) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3566      +/-   ##
==========================================
+ Coverage   85.81%   85.91%   +0.10%     
==========================================
  Files         300      301       +1     
  Lines       55548    56218     +670     
==========================================
+ Hits        47666    48301     +635     
- Misses       7882     7917      +35     
Impacted Files Coverage Δ
datafusion/sql/src/planner.rs 81.25% <100.00%> (ø)
datafusion/optimizer/src/type_coercion.rs 92.18% <0.00%> (-1.38%) ⬇️
...sion/core/src/physical_plan/file_format/parquet.rs 94.65% <0.00%> (-0.25%) ⬇️
datafusion/expr/src/logical_plan/plan.rs 77.75% <0.00%> (-0.17%) ⬇️
datafusion/core/tests/sql/predicates.rs 100.00% <0.00%> (ø)
...tafusion/core/src/physical_plan/file_format/mod.rs 96.94% <0.00%> (ø)
datafusion/optimizer/src/reduce_cross_join.rs 94.54% <0.00%> (ø)
datafusion/core/src/execution/context.rs 79.33% <0.00%> (+0.02%) ⬆️
datafusion/optimizer/src/projection_push_down.rs 98.11% <0.00%> (+0.04%) ⬆️
datafusion/common/src/scalar.rs 85.18% <0.00%> (+0.06%) ⬆️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @mbrobbel

ordered-float = "3.0"
parquet = { version = "23.0.0", features = ["arrow"], optional = true }
parquet = { version = "23.0.0", default-features = false, optional = true }
Copy link
Contributor

Choose a reason for hiding this comment

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

Given the only reason for these dependencies is deriving From conversions for ArrowError, perhaps we could/should just remove them. This is what I have been doing when splitting apart arrow-rs - see apache/arrow-rs#2711.

In general the error handling is a little bit unfortunate, so perhaps this will all get addressed eventually by apache/arrow-rs#2725

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes absolutely. I was planning on revisiting this after the arrow-rs split.

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Just as an FYI, mixing feature combinations within a workspace can make for a pretty poor development experience as switching between targets causes things to get rebuilt. Hopefully as we split apart arrow-rs apache/arrow-rs#2594 our reliance on feature flags will reduce.

See https://docs.rs/cargo-hakari/latest/cargo_hakari/about/index.html#what-are-workspace-hack-crates for more information.

@alamb alamb merged commit 31acc83 into apache:master Sep 21, 2022
@alamb
Copy link
Contributor

alamb commented Sep 21, 2022

Thanks @mbrobbel

@ursabot
Copy link

ursabot commented Sep 21, 2022

Benchmark runs are scheduled for baseline = cec6395 and contender = 31acc83. 31acc83 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

@mbrobbel mbrobbel deleted the datafusion-sql-deps branch September 21, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants