Skip to content

Commit eeec017

Browse files
authored
Bump MSRV to 1.87.0 (#17724)
* Bump MSRV to 1.87.0 * automatic code fixes * Add upgrading entry
1 parent a8d5016 commit eeec017

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ license = "Apache-2.0"
7676
readme = "README.md"
7777
repository = "https://github.com/apache/datafusion"
7878
# Define Minimum Supported Rust Version (MSRV)
79-
rust-version = "1.86.0"
79+
rust-version = "1.87.0"
8080
# Define DataFusion version
8181
version = "50.0.0"
8282

datafusion/core/src/datasource/file_format/csv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ mod tests {
12331233
fn csv_values(line_number: usize) -> (i32, f64, bool, String) {
12341234
let int_value = line_number as i32;
12351235
let float_value = line_number as f64;
1236-
let bool_value = line_number % 2 == 0;
1236+
let bool_value = line_number.is_multiple_of(2);
12371237
let char_value = format!("{line_number}-string");
12381238
(int_value, float_value, bool_value, char_value)
12391239
}

datafusion/functions-nested/src/planner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl ExprPlanner for NestedFunctionPlanner {
108108
}
109109

110110
fn plan_make_map(&self, args: Vec<Expr>) -> Result<PlannerResult<Vec<Expr>>> {
111-
if args.len() % 2 != 0 {
111+
if !args.len().is_multiple_of(2) {
112112
return plan_err!("make_map requires an even number of arguments");
113113
}
114114

datafusion/functions/src/core/named_struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl ScalarUDFImpl for NamedStructFunc {
104104
);
105105
}
106106

107-
if args.scalar_arguments.len() % 2 != 0 {
107+
if !args.scalar_arguments.len().is_multiple_of(2) {
108108
return exec_err!(
109109
"named_struct requires an even number of arguments, got {} instead",
110110
args.scalar_arguments.len()

datafusion/physical-plan/src/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ impl TreeRenderVisitor<'_, '_> {
935935
} else {
936936
let total_spaces = max_render_width - render_width;
937937
let half_spaces = total_spaces / 2;
938-
let extra_left_space = if total_spaces % 2 == 0 { 0 } else { 1 };
938+
let extra_left_space = if total_spaces.is_multiple_of(2) { 0 } else { 1 };
939939
format!(
940940
"{}{}{}",
941941
" ".repeat(half_spaces + extra_left_space),

datafusion/sql/src/unparser/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ impl Unparser<'_> {
606606
}
607607

608608
fn named_struct_to_sql(&self, args: &[Expr]) -> Result<ast::Expr> {
609-
if args.len() % 2 != 0 {
609+
if !args.len().is_multiple_of(2) {
610610
return internal_err!("named_struct must have an even number of arguments");
611611
}
612612

docs/source/library-user-guide/upgrading.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ You can see the current [status of the `51.0.0 `release here](https://github.com
2727

2828
## DataFusion `50.0.0`
2929

30+
### `MSRV` updated to 1.87.0
31+
32+
The Minimum Supported Rust Version (MSRV) has been updated to [`1.87.0`].
33+
34+
[`1.87.0`]: https://releases.rs/docs/1.87.0/
35+
3036
### ListingTable automatically detects Hive Partitioned tables
3137

3238
DataFusion 50.0.0 automatically infers Hive partitions when using the `ListingTableFactory` and `CREATE EXTERNAL TABLE`. Previously,

0 commit comments

Comments
 (0)