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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update parquet to depend on arrow subcrates #3028

Merged
merged 6 commits into from Nov 10, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Nov 6, 2022

Which issue does this PR close?

Part of #2594

Rationale for this change

time cargo build --release before

________________________________________________________
Executed in  101.75 secs    fish           external
   usr time  715.02 secs    0.00 millis  715.02 secs
   sys time   14.18 secs    2.08 millis   14.18 secs

After

________________________________________________________
Executed in   71.16 secs    fish           external
   usr time  463.27 secs    0.72 millis  463.27 secs
   sys time   10.95 secs    1.50 millis   10.95 secs

The tall pole is now actually the compression codecs and not arrow 馃帀

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the parquet Changes to the parquet crate label Nov 6, 2022
@@ -30,6 +30,14 @@ edition = "2021"
rust-version = "1.62"

[dependencies]
arrow-array = { version = "26.0.0", path = "../arrow-array", default-features = false, optional = true }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is somewhat unfortunate the number of these, perhaps we should provide re-exports to reduce this. On the flip side, parquet is a very complex crate and so perhaps it is just a bit special in needing all the things 馃槄

Copy link
Member

Choose a reason for hiding this comment

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

Maybe for some basic crates like arrow-buffer, arrow-data, arrow-schema, perhaps we can provide re-export (arrow-core?) for them.

Like you said, if this is just a special case, then it is fine.

@tustvold tustvold marked this pull request as draft November 6, 2022 09:42
@tustvold
Copy link
Contributor Author

tustvold commented Nov 6, 2022

Need to revisit how we plumb in test utilities 馃槩

@tustvold tustvold marked this pull request as ready for review November 10, 2022 03:14
Comment on lines +37 to +38
syn = { version = "1.0", features = ["extra-traits"] }
parquet = { path = "../parquet", version = "26.0.0", default-features = false }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is part drive-by-cleanup, part fix as it was relying on multiversion which is a transitive dependency of arrow to enable the syn features it requires. As parquet no longer depends on arrow, this caused issues

@@ -19,8 +19,8 @@

use std::{cell, io, result, str};

#[cfg(any(feature = "arrow", test))]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary to avoid having to declare all the various subcrates as dev-dependencies

Copy link
Member

Choose a reason for hiding this comment

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

You mean removing test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this only worked because arrow is a dev-dependency

Copy link
Member

@viirya viirya Nov 10, 2022

Choose a reason for hiding this comment

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

Hmm, I tried to restore only this line locally, and looks like the tests are still okay to run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you do cargo test --no-default-features?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, yea, arrow is default feature. I didn't exclude it.

Comment on lines 79 to +81
default = ["arrow", "snap", "brotli", "flate2", "lz4", "zstd", "base64"]
# Enable arrow reader/writer APIs
arrow = ["dep:arrow", "base64"]
arrow = ["base64", "arrow-array", "arrow-buffer", "arrow-cast", "arrow-data", "arrow-schema", "arrow-select", "arrow-ipc"]
Copy link
Member

@viirya viirya Nov 10, 2022

Choose a reason for hiding this comment

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

Seems two lines can combined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Member

Choose a reason for hiding this comment

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

Nvm, I thought if this arrow is unnecessary and we can just have these "base64" features. But I saw you use arrow as a whole feature in many places.

Comment on lines +518 to 519
#[cfg(feature = "arrow")]
pub(crate) fn peek_next(&mut self) -> Result<bool> {
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, is peek_next optional? It is used by some APIs like skip_records. If arrow is not enabled, what would happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These changes were necessary to placate clippy as they aren't currently used by anything outside the arrow module

Copy link
Member

@viirya viirya 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.

@tustvold tustvold merged commit 4dd7fea into apache:master Nov 10, 2022
@ursabot
Copy link

ursabot commented Nov 10, 2022

Benchmark runs are scheduled for baseline = 132152c and contender = 4dd7fea. 4dd7fea 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-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped 鈿狅笍 Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped 鈿狅笍 Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped 鈿狅笍 Benchmarking of arrow-rs-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
parquet Changes to the parquet crate parquet-derive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants