Skip to content

Commit

Permalink
Minimize features (#1399)
Browse files Browse the repository at this point in the history
* Turn off default features of ahash as they're not needed

The default feature set of the ahash crate is ["std"][1]. The std
feature enables features which require the standard library, namely
`AHashMap` and `AHashSet`. DataFusion currently only uses `AHasher`,
`CallHasher`, and `RandomState`, none of which require the standard
library.

This gives more control to projects depending on datafusion to minimize
the amount of code they depend on.

[1]: https://github.com/tkaitchuck/aHash/blob/e77cab8c1e15bfc9f54dfd28bd8820c2a7bb27c4/Cargo.toml#L24-L25

* Turn off default features of chrono as they're not needed

In fact, the "oldtime" feature is [considered deprecated][1] and only
included by default for backwards compatibility.

The other features don't appear to be used by datafusion or
ballista, so this gives projects depending on these crates more
flexibility in what they choose to include.

[1]: https://github.com/chronotope/chrono/blame/f6bd567bb677262645c1fc3131c8c1071cd77ec3/README.md#L88-L94
  • Loading branch information
carols10cents authored Dec 18, 2021
1 parent 9d31866 commit 8193e03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ballista/rust/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build = "build.rs"
simd = ["datafusion/simd"]

[dependencies]
ahash = "0.7"
ahash = { version = "0.7", default-features = false }
async-trait = "0.1.36"
futures = "0.3"
hashbrown = "0.11"
Expand All @@ -41,7 +41,7 @@ sqlparser = "0.13"
tokio = "1.0"
tonic = "0.5"
uuid = { version = "0.8", features = ["v4"] }
chrono = "0.4"
chrono = { version = "0.4", default-features = false }

arrow-flight = { version = "6.4.0" }

Expand Down
4 changes: 2 additions & 2 deletions datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ force_hash_collisions = []
avro = ["avro-rs", "num-traits"]

[dependencies]
ahash = "0.7"
ahash = { version = "0.7", default-features = false }
hashbrown = { version = "0.11", features = ["raw"] }
arrow = { version = "6.4.0", features = ["prettyprint"] }
parquet = { version = "6.4.0", features = ["arrow"] }
sqlparser = "0.13"
paste = "^1.0"
num_cpus = "1.13.0"
chrono = "0.4"
chrono = { version = "0.4", default-features = false }
async-trait = "0.1.41"
futures = "0.3"
pin-project-lite= "^0.2.7"
Expand Down

0 comments on commit 8193e03

Please sign in to comment.