Apache DataFusion SQL Query Engine
Update minimum rust version to 1.72 (#8997)
Andrew Lamb1f70823cfc71
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex 501b05c25d..c94137ebd1 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -492,7 +492,11 @@ jobs:./dev/update_config_docs.shgit 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-climsrv:name: Verify MSRV (Min Supported Rust Version)runs-on: ubuntu-latestdiff --git a/Cargo.toml b/Cargo.tomlindex 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.tomlindex 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.tomlindex 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.tomlindex 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.rsindex 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.rsindex 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.tomlindex 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 protocexclude = ["*.proto"]diff --git a/datafusion/proto/gen/Cargo.toml b/datafusion/proto/gen/Cargo.tomlindex 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.tomlindex 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.tomlindex 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.tomlindex 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 }