Skip to content

Commit bea1b0a

Browse files
authored
chore: Upgrade Rust version to 1.90.0 (#17677)
* chore: bump workspace rust version to 1.90.0 * fix clippy errors * fix clippy errors * try using dedicate runner temp space * retrigger * inspect disk usage * split build/run * disable debug info in ci profile * revert ci changes
1 parent 602475f commit bea1b0a

File tree

12 files changed

+18
-15
lines changed

12 files changed

+18
-15
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ rpath = false
199199
strip = false # Retain debug info for flamegraphs
200200

201201
[profile.ci]
202+
debug = false
202203
inherits = "dev"
203204
incremental = false
204205

datafusion/core/tests/macro_hygiene/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ mod config_field {
7373
#[test]
7474
fn test_macro() {
7575
#[derive(Debug)]
76+
#[allow(dead_code)]
7677
struct E;
7778

7879
impl std::fmt::Display for E {

datafusion/expr-common/src/statistics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl Distribution {
189189
pub fn target_type(args: &[&ScalarValue]) -> Result<DataType> {
190190
let mut arg_types = args
191191
.iter()
192-
.filter(|&&arg| (arg != &ScalarValue::Null))
192+
.filter(|&&arg| arg != &ScalarValue::Null)
193193
.map(|&arg| arg.data_type());
194194

195195
let Some(dt) = arg_types.next().map_or_else(

datafusion/ffi/src/udwf/partition_evaluator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub struct PartitionEvaluatorPrivateData {
8686
}
8787

8888
impl FFI_PartitionEvaluator {
89-
unsafe fn inner_mut(&mut self) -> &mut Box<(dyn PartitionEvaluator + 'static)> {
89+
unsafe fn inner_mut(&mut self) -> &mut Box<dyn PartitionEvaluator + 'static> {
9090
let private_data = self.private_data as *mut PartitionEvaluatorPrivateData;
9191
&mut (*private_data).evaluator
9292
}

datafusion/functions-aggregate/src/average.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ impl<T: DecimalType + ArrowNumericType + Debug> Accumulator for DecimalAvgAccumu
528528
self.count += (values.len() - values.null_count()) as u64;
529529

530530
if let Some(x) = sum(values) {
531-
let v = self.sum.get_or_insert(T::Native::default());
531+
let v = self.sum.get_or_insert_with(T::Native::default);
532532
self.sum = Some(v.add_wrapping(x));
533533
}
534534
Ok(())
@@ -573,7 +573,7 @@ impl<T: DecimalType + ArrowNumericType + Debug> Accumulator for DecimalAvgAccumu
573573

574574
// sums are summed
575575
if let Some(x) = sum(states[1].as_primitive::<T>()) {
576-
let v = self.sum.get_or_insert(T::Native::default());
576+
let v = self.sum.get_or_insert_with(T::Native::default);
577577
self.sum = Some(v.add_wrapping(x));
578578
}
579579
Ok(())

datafusion/functions-aggregate/src/bit_and_or_xor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ where
382382
{
383383
fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
384384
if let Some(x) = arrow::compute::bit_or(values[0].as_primitive::<T>()) {
385-
let v = self.value.get_or_insert(T::Native::usize_as(0));
385+
let v = self.value.get_or_insert_with(|| T::Native::usize_as(0));
386386
*v = *v | x;
387387
}
388388
Ok(())
@@ -427,7 +427,7 @@ where
427427
{
428428
fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
429429
if let Some(x) = arrow::compute::bit_xor(values[0].as_primitive::<T>()) {
430-
let v = self.value.get_or_insert(T::Native::usize_as(0));
430+
let v = self.value.get_or_insert_with(|| T::Native::usize_as(0));
431431
*v = *v ^ x;
432432
}
433433
Ok(())

datafusion/functions-aggregate/src/sum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ impl<T: ArrowNumericType> Accumulator for SumAccumulator<T> {
335335
fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
336336
let values = values[0].as_primitive::<T>();
337337
if let Some(x) = arrow::compute::sum(values) {
338-
let v = self.sum.get_or_insert(T::Native::usize_as(0));
338+
let v = self.sum.get_or_insert_with(|| T::Native::usize_as(0));
339339
*v = v.add_wrapping(x);
340340
}
341341
Ok(())

datafusion/physical-expr/src/expressions/binary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ fn boolean_op(
160160
left: &dyn Array,
161161
right: &dyn Array,
162162
op: impl FnOnce(&BooleanArray, &BooleanArray) -> Result<BooleanArray, ArrowError>,
163-
) -> Result<Arc<(dyn Array + 'static)>, ArrowError> {
163+
) -> Result<Arc<dyn Array + 'static>, ArrowError> {
164164
let ll = as_boolean_array(left).expect("boolean_op failed to downcast left array");
165165
let rr = as_boolean_array(right).expect("boolean_op failed to downcast right array");
166166
op(ll, rr).map(|t| Arc::new(t) as _)

datafusion/physical-plan/src/joins/sort_merge_join/exec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,10 @@ impl DisplayAs for SortMergeJoinExec {
362362
"SortMergeJoin: join_type={:?}, on=[{}]{}{}",
363363
self.join_type,
364364
on,
365-
self.filter.as_ref().map_or("".to_string(), |f| format!(
366-
", filter={}",
367-
f.expression()
368-
)),
365+
self.filter.as_ref().map_or_else(
366+
|| "".to_string(),
367+
|f| format!(", filter={}", f.expression())
368+
),
369369
display_null_equality,
370370
)
371371
}

datafusion/physical-plan/src/limit.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ impl DisplayAs for GlobalLimitExec {
105105
f,
106106
"GlobalLimitExec: skip={}, fetch={}",
107107
self.skip,
108-
self.fetch.map_or("None".to_string(), |x| x.to_string())
108+
self.fetch
109+
.map_or_else(|| "None".to_string(), |x| x.to_string())
109110
)
110111
}
111112
DisplayFormatType::TreeRender => {

0 commit comments

Comments
 (0)