From e5f544d7a3d87a3a9ba9028013969df6e320107d Mon Sep 17 00:00:00 2001 From: comphead Date: Wed, 4 Sep 2024 13:32:51 -0700 Subject: [PATCH 1/2] minor: reuse SessionStateBuilder methods for default builder --- .../core/src/execution/session_state.rs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rs index 90f175b59385..675ac798bf4e 100644 --- a/datafusion/core/src/execution/session_state.rs +++ b/datafusion/core/src/execution/session_state.rs @@ -1035,17 +1035,15 @@ impl SessionStateBuilder { } } - /// Set defaults for table_factories, file formats, expr_planners and builtin - /// scalar and aggregate functions. - pub fn with_default_features(mut self) -> Self { - self.table_factories = Some(SessionStateDefaults::default_table_factories()); - self.file_formats = Some(SessionStateDefaults::default_file_formats()); - self.expr_planners = Some(SessionStateDefaults::default_expr_planners()); - self.scalar_functions = Some(SessionStateDefaults::default_scalar_functions()); - self.aggregate_functions = - Some(SessionStateDefaults::default_aggregate_functions()); - self.window_functions = Some(SessionStateDefaults::default_window_functions()); - self + /// Create default builder with defaults for table_factories, file formats, expr_planners and builtin + /// scalar, aggregate and windows functions. + pub fn with_default_features(self) -> Self { + self.with_table_factories(SessionStateDefaults::default_table_factories()) + .with_file_formats(SessionStateDefaults::default_file_formats()) + .with_expr_planners(SessionStateDefaults::default_expr_planners()) + .with_scalar_functions(SessionStateDefaults::default_scalar_functions()) + .with_aggregate_functions(SessionStateDefaults::default_aggregate_functions()) + .with_window_functions(SessionStateDefaults::default_window_functions()) } /// Set the session id. From c874dbfb4601a1bb872799037e9a37b405c69cae Mon Sep 17 00:00:00 2001 From: comphead Date: Mon, 9 Sep 2024 09:34:51 -0700 Subject: [PATCH 2/2] minor: bump MSRV to 1.78 --- .github/workflows/rust.yml | 4 ++-- Cargo.toml | 2 +- datafusion-cli/Cargo.toml | 2 +- datafusion/core/Cargo.toml | 2 +- datafusion/proto-common/Cargo.toml | 2 +- datafusion/proto-common/gen/Cargo.toml | 2 +- datafusion/proto/Cargo.toml | 2 +- datafusion/proto/gen/Cargo.toml | 2 +- datafusion/substrait/Cargo.toml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 809f3acd8374..edaa49ec6e7e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -569,9 +569,9 @@ jobs: # # To reproduce: # 1. Install the version of Rust that is failing. Example: - # rustup install 1.76.0 + # rustup install 1.78.0 # 2. Run the command that failed with that version. Example: - # cargo +1.76.0 check -p datafusion + # cargo +1.78.0 check -p datafusion # # To resolve, either: # 1. Change your code to use older Rust features, diff --git a/Cargo.toml b/Cargo.toml index c155e475a026..9ba131e56a9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,7 +57,7 @@ homepage = "https://datafusion.apache.org" license = "Apache-2.0" readme = "README.md" repository = "https://github.com/apache/datafusion" -rust-version = "1.76" +rust-version = "1.78" version = "41.0.0" [workspace.dependencies] diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml index f2f52846ab54..e378f129d6e4 100644 --- a/datafusion-cli/Cargo.toml +++ b/datafusion-cli/Cargo.toml @@ -26,7 +26,7 @@ license = "Apache-2.0" homepage = "https://datafusion.apache.org" repository = "https://github.com/apache/datafusion" # Specify MSRV here as `cargo msrv` doesn't support workspace version -rust-version = "1.76" +rust-version = "1.78" readme = "README.md" [dependencies] diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index de228e058096..82a799f8585c 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -30,7 +30,7 @@ authors = { workspace = true } # 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.76" +rust-version = "1.78" [lints] workspace = true diff --git a/datafusion/proto-common/Cargo.toml b/datafusion/proto-common/Cargo.toml index 7ba503171520..5051c8f9322f 100644 --- a/datafusion/proto-common/Cargo.toml +++ b/datafusion/proto-common/Cargo.toml @@ -26,7 +26,7 @@ homepage = { workspace = true } repository = { workspace = true } license = { workspace = true } authors = { workspace = true } -rust-version = "1.76" +rust-version = "1.78" # Exclude proto files so crates.io consumers don't need protoc exclude = ["*.proto"] diff --git a/datafusion/proto-common/gen/Cargo.toml b/datafusion/proto-common/gen/Cargo.toml index cca49dba7ed3..6d3e6cba52e6 100644 --- a/datafusion/proto-common/gen/Cargo.toml +++ b/datafusion/proto-common/gen/Cargo.toml @@ -20,7 +20,7 @@ name = "gen-common" description = "Code generation for proto" version = "0.1.0" edition = { workspace = true } -rust-version = "1.76" +rust-version = "1.78" authors = { workspace = true } homepage = { workspace = true } repository = { workspace = true } diff --git a/datafusion/proto/Cargo.toml b/datafusion/proto/Cargo.toml index 32678246c005..ce40129fcf93 100644 --- a/datafusion/proto/Cargo.toml +++ b/datafusion/proto/Cargo.toml @@ -27,7 +27,7 @@ repository = { workspace = true } license = { workspace = true } authors = { workspace = true } # Specify MSRV here as `cargo msrv` doesn't support workspace version -rust-version = "1.76" +rust-version = "1.78" # 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 1dc5f7e0dddc..14658ea78d2a 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.76" +rust-version = "1.78" authors = { workspace = true } homepage = { workspace = true } repository = { workspace = true } diff --git a/datafusion/substrait/Cargo.toml b/datafusion/substrait/Cargo.toml index f379ac6042dd..18c34a2ce231 100644 --- a/datafusion/substrait/Cargo.toml +++ b/datafusion/substrait/Cargo.toml @@ -26,7 +26,7 @@ repository = { workspace = true } license = { workspace = true } authors = { workspace = true } # Specify MSRV here as `cargo msrv` doesn't support workspace version -rust-version = "1.76" +rust-version = "1.78" [lints] workspace = true