This is an automated email from the ASF dual-hosted git repository.
comphead pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 1f70823cfc Update minimum rust version to 1.72 (#8997)
1f70823cfc is described below
commit 1f70823cfc71a3f66b8c6ebd6a7c15e0c0ea045e
Author: Andrew Lamb <[email protected]>
AuthorDate: Thu Feb 1 11:26:37 2024 -0500
Update minimum rust version to 1.72 (#8997)
* Update minimum rust version to 1.72
---
.github/workflows/rust.yml | 6 +++++-
Cargo.toml | 2 +-
benchmarks/Cargo.toml | 2 +-
datafusion-cli/Cargo.toml | 3 ++-
datafusion/core/Cargo.toml | 5 ++++-
datafusion/expr/src/expr.rs | 11 +++--------
datafusion/physical-expr/src/aggregate/hyperloglog.rs | 8 +++-----
datafusion/proto/Cargo.toml | 3 ++-
datafusion/proto/gen/Cargo.toml | 2 +-
datafusion/substrait/Cargo.toml | 3 ++-
datafusion/wasmtest/Cargo.toml | 2 +-
docs/Cargo.toml | 2 +-
12 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 501b05c25d..c94137ebd1 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -492,7 +492,11 @@ jobs:
./dev/update_config_docs.sh
git diff --exit-code
- # Verify MSRV for the crates which are directly used by other projects.
+ # Verify MSRV for the crates which are directly used by other projects:
+ # - datafusion
+ # - datafusion-substrait
+ # - datafusion-proto
+ # - datafusion-cli
msrv:
name: Verify MSRV (Min Supported Rust Version)
runs-on: ubuntu-latest
diff --git a/Cargo.toml b/Cargo.toml
index d56d37ad2b..cccca01741 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,7 +28,7 @@ homepage = "https://github.com/apache/arrow-datafusion"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/apache/arrow-datafusion"
-rust-version = "1.70"
+rust-version = "1.72"
version = "35.0.0"
[workspace.dependencies]
diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index 50b79b4b06..ced77c73f5 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -24,7 +24,7 @@ authors = ["Apache Arrow <[email protected]>"]
homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
license = "Apache-2.0"
-rust-version = "1.70"
+rust-version = { workspace = true }
[features]
ci = []
diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml
index 07ee65e3f6..79a1f0162e 100644
--- a/datafusion-cli/Cargo.toml
+++ b/datafusion-cli/Cargo.toml
@@ -25,7 +25,8 @@ keywords = ["arrow", "datafusion", "query", "sql"]
license = "Apache-2.0"
homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
-rust-version = "1.70"
+# Specify MSRV here as `cargo msrv` doesn't support workspace version
+rust-version = "1.72"
readme = "README.md"
[dependencies]
diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml
index f9a4c54b7d..2d795d0f83 100644
--- a/datafusion/core/Cargo.toml
+++ b/datafusion/core/Cargo.toml
@@ -27,7 +27,10 @@ homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
-rust-version = "1.70"
+# Specify MSRV here as `cargo msrv` doesn't support workspace version and
fails with
+# "Unable to find key 'package.rust-version' (or 'package.metadata.msrv') in
'arrow-datafusion/Cargo.toml'"
+# https://github.com/foresterre/cargo-msrv/issues/590
+rust-version = "1.72"
[lib]
name = "datafusion"
diff --git a/datafusion/expr/src/expr.rs b/datafusion/expr/src/expr.rs
index 9da1f4bb4d..0000f3df03 100644
--- a/datafusion/expr/src/expr.rs
+++ b/datafusion/expr/src/expr.rs
@@ -33,7 +33,7 @@ use datafusion_common::{plan_err, Column, DataFusionError,
Result, ScalarValue};
use std::collections::HashSet;
use std::fmt;
use std::fmt::{Display, Formatter, Write};
-use std::hash::{BuildHasher, Hash, Hasher};
+use std::hash::Hash;
use std::str::FromStr;
use std::sync::Arc;
@@ -853,13 +853,8 @@ const SEED: ahash::RandomState =
ahash::RandomState::with_seeds(0, 0, 0, 0);
impl PartialOrd for Expr {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
- let mut hasher = SEED.build_hasher();
- self.hash(&mut hasher);
- let s = hasher.finish();
-
- let mut hasher = SEED.build_hasher();
- other.hash(&mut hasher);
- let o = hasher.finish();
+ let s = SEED.hash_one(self);
+ let o = SEED.hash_one(other);
Some(s.cmp(&o))
}
diff --git a/datafusion/physical-expr/src/aggregate/hyperloglog.rs
b/datafusion/physical-expr/src/aggregate/hyperloglog.rs
index a0d55ca71d..657a7b9f7f 100644
--- a/datafusion/physical-expr/src/aggregate/hyperloglog.rs
+++ b/datafusion/physical-expr/src/aggregate/hyperloglog.rs
@@ -34,8 +34,8 @@
//!
//! This module also borrows some code structure from
[pdatastructs.rs](https://github.com/crepererum/pdatastructs.rs/blob/3997ed50f6b6871c9e53c4c5e0f48f431405fc63/src/hyperloglog.rs).
-use ahash::{AHasher, RandomState};
-use std::hash::{BuildHasher, Hash, Hasher};
+use ahash::RandomState;
+use std::hash::Hash;
use std::marker::PhantomData;
/// The greater is P, the smaller the error.
@@ -102,9 +102,7 @@ where
/// reasonable performance.
#[inline]
fn hash_value(&self, obj: &T) -> u64 {
- let mut hasher: AHasher = SEED.build_hasher();
- obj.hash(&mut hasher);
- hasher.finish()
+ SEED.hash_one(obj)
}
/// Adds an element to the HyperLogLog.
diff --git a/datafusion/proto/Cargo.toml b/datafusion/proto/Cargo.toml
index 2eaf251987..cdd464f38a 100644
--- a/datafusion/proto/Cargo.toml
+++ b/datafusion/proto/Cargo.toml
@@ -26,7 +26,8 @@ homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
-rust-version = "1.70"
+# Specify MSRV here as `cargo msrv` doesn't support workspace version
+rust-version = "1.72"
# Exclude proto files so crates.io consumers don't need protoc
exclude = ["*.proto"]
diff --git a/datafusion/proto/gen/Cargo.toml b/datafusion/proto/gen/Cargo.toml
index 8b3f3f98a8..c80bd50af2 100644
--- a/datafusion/proto/gen/Cargo.toml
+++ b/datafusion/proto/gen/Cargo.toml
@@ -20,7 +20,7 @@ name = "gen"
description = "Code generation for proto"
version = "0.1.0"
edition = { workspace = true }
-rust-version = "1.64"
+rust-version = "1.72"
authors = ["Apache Arrow <[email protected]>"]
homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
diff --git a/datafusion/substrait/Cargo.toml b/datafusion/substrait/Cargo.toml
index a4d18e0d35..38414fc5e6 100644
--- a/datafusion/substrait/Cargo.toml
+++ b/datafusion/substrait/Cargo.toml
@@ -25,7 +25,8 @@ homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
-rust-version = "1.70"
+# Specify MSRV here as `cargo msrv` doesn't support workspace version
+rust-version = "1.72"
[dependencies]
async-recursion = "1.0"
diff --git a/datafusion/wasmtest/Cargo.toml b/datafusion/wasmtest/Cargo.toml
index 91af15a6ea..c47dcf83c8 100644
--- a/datafusion/wasmtest/Cargo.toml
+++ b/datafusion/wasmtest/Cargo.toml
@@ -25,7 +25,7 @@ homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
-rust-version = "1.70"
+rust-version = { workspace = true }
[lib]
crate-type = ["cdylib", "rlib"]
diff --git a/docs/Cargo.toml b/docs/Cargo.toml
index 3a8c90cae0..7eecd11df8 100644
--- a/docs/Cargo.toml
+++ b/docs/Cargo.toml
@@ -26,7 +26,7 @@ homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
-rust-version = "1.70"
+rust-version = { workspace = true }
[dependencies]
datafusion = { path = "../datafusion/core", version = "35.0.0",
default-features = false }