Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ rpath = false
strip = false # Retain debug info for flamegraphs

[profile.ci]
debug = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a good idea to avoid debugging information 👍

inherits = "dev"
incremental = false

Expand Down
1 change: 1 addition & 0 deletions datafusion/core/tests/macro_hygiene/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ mod config_field {
#[test]
fn test_macro() {
#[derive(Debug)]
#[allow(dead_code)]
struct E;

impl std::fmt::Display for E {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/expr-common/src/statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl Distribution {
pub fn target_type(args: &[&ScalarValue]) -> Result<DataType> {
let mut arg_types = args
.iter()
.filter(|&&arg| (arg != &ScalarValue::Null))
.filter(|&&arg| arg != &ScalarValue::Null)
.map(|&arg| arg.data_type());

let Some(dt) = arg_types.next().map_or_else(
Expand Down
2 changes: 1 addition & 1 deletion datafusion/ffi/src/udwf/partition_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub struct PartitionEvaluatorPrivateData {
}

impl FFI_PartitionEvaluator {
unsafe fn inner_mut(&mut self) -> &mut Box<(dyn PartitionEvaluator + 'static)> {
unsafe fn inner_mut(&mut self) -> &mut Box<dyn PartitionEvaluator + 'static> {
let private_data = self.private_data as *mut PartitionEvaluatorPrivateData;
&mut (*private_data).evaluator
}
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions-aggregate/src/average.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ impl<T: DecimalType + ArrowNumericType + Debug> Accumulator for DecimalAvgAccumu
self.count += (values.len() - values.null_count()) as u64;

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

// sums are summed
if let Some(x) = sum(states[1].as_primitive::<T>()) {
let v = self.sum.get_or_insert(T::Native::default());
let v = self.sum.get_or_insert_with(T::Native::default);
self.sum = Some(v.add_wrapping(x));
}
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions-aggregate/src/bit_and_or_xor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ where
{
fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
if let Some(x) = arrow::compute::bit_or(values[0].as_primitive::<T>()) {
let v = self.value.get_or_insert(T::Native::usize_as(0));
let v = self.value.get_or_insert_with(|| T::Native::usize_as(0));
*v = *v | x;
}
Ok(())
Expand Down Expand Up @@ -427,7 +427,7 @@ where
{
fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
if let Some(x) = arrow::compute::bit_xor(values[0].as_primitive::<T>()) {
let v = self.value.get_or_insert(T::Native::usize_as(0));
let v = self.value.get_or_insert_with(|| T::Native::usize_as(0));
*v = *v ^ x;
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions-aggregate/src/sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl<T: ArrowNumericType> Accumulator for SumAccumulator<T> {
fn update_batch(&mut self, values: &[ArrayRef]) -> Result<()> {
let values = values[0].as_primitive::<T>();
if let Some(x) = arrow::compute::sum(values) {
let v = self.sum.get_or_insert(T::Native::usize_as(0));
let v = self.sum.get_or_insert_with(|| T::Native::usize_as(0));
*v = v.add_wrapping(x);
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/expressions/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fn boolean_op(
left: &dyn Array,
right: &dyn Array,
op: impl FnOnce(&BooleanArray, &BooleanArray) -> Result<BooleanArray, ArrowError>,
) -> Result<Arc<(dyn Array + 'static)>, ArrowError> {
) -> Result<Arc<dyn Array + 'static>, ArrowError> {
let ll = as_boolean_array(left).expect("boolean_op failed to downcast left array");
let rr = as_boolean_array(right).expect("boolean_op failed to downcast right array");
op(ll, rr).map(|t| Arc::new(t) as _)
Expand Down
8 changes: 4 additions & 4 deletions datafusion/physical-plan/src/joins/sort_merge_join/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ impl DisplayAs for SortMergeJoinExec {
"SortMergeJoin: join_type={:?}, on=[{}]{}{}",
self.join_type,
on,
self.filter.as_ref().map_or("".to_string(), |f| format!(
", filter={}",
f.expression()
)),
self.filter.as_ref().map_or_else(
|| "".to_string(),
|f| format!(", filter={}", f.expression())
),
display_null_equality,
)
}
Expand Down
3 changes: 2 additions & 1 deletion datafusion/physical-plan/src/limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ impl DisplayAs for GlobalLimitExec {
f,
"GlobalLimitExec: skip={}, fetch={}",
self.skip,
self.fetch.map_or("None".to_string(), |x| x.to_string())
self.fetch
.map_or_else(|| "None".to_string(), |x| x.to_string())
)
}
DisplayFormatType::TreeRender => {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/spark/src/function/string/luhn_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ fn luhn_check_impl(input: &str) -> bool {
alt = !alt;
}

digits_processed > 0 && sum % 10 == 0
digits_processed > 0 && sum.is_multiple_of(10)
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
# to compile this workspace and run CI jobs.

[toolchain]
channel = "1.89.0"
channel = "1.90.0"
components = ["rustfmt", "clippy"]
Loading