Apache DataFusion SQL Query Engine
minor: fix clippy problem in new version. (#5532)
jakevin9878ee011b99
diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rsindex 7c33196285..bb443f8aa5 100644--- a/datafusion/common/src/dfschema.rs+++ b/datafusion/common/src/dfschema.rs@@ -519,7 +519,7 @@ impl From<DFSchema> for SchemaRef {}// Hashing refers to a subset of fields considered in PartialEq.-#[allow(clippy::derive_hash_xor_eq)]+#[allow(clippy::derived_hash_with_manual_eq)]impl Hash for DFSchema {fn hash<H: std::hash::Hasher>(&self, state: &mut H) {self.fields.hash(state);diff --git a/datafusion/core/src/physical_plan/aggregates/no_grouping.rs b/datafusion/core/src/physical_plan/aggregates/no_grouping.rsindex 6356009a49..c13f005b03 100644--- a/datafusion/core/src/physical_plan/aggregates/no_grouping.rs+++ b/datafusion/core/src/physical_plan/aggregates/no_grouping.rs@@ -164,7 +164,7 @@ impl RecordBatchStream for AggregateStream {/// Perform group-by aggregation for the given [`RecordBatch`].///-/// If successfull, this returns the additional number of bytes that were allocated during this process.+/// If successful, this returns the additional number of bytes that were allocated during this process.////// TODO: Make this a member functionfn aggregate_batch(diff --git a/datafusion/core/src/physical_plan/aggregates/row_hash.rs b/datafusion/core/src/physical_plan/aggregates/row_hash.rsindex 5a5e36a248..de769bbe8f 100644--- a/datafusion/core/src/physical_plan/aggregates/row_hash.rs+++ b/datafusion/core/src/physical_plan/aggregates/row_hash.rs@@ -297,7 +297,7 @@ impl RecordBatchStream for GroupedHashAggregateStream {impl GroupedHashAggregateStream {/// Perform group-by aggregation for the given [`RecordBatch`].///- /// If successfull, this returns the additional number of bytes that were allocated during this process.+ /// If successful, this returns the additional number of bytes that were allocated during this process.///fn group_aggregate_batch(&mut self, batch: RecordBatch) -> Result<usize> {// Evaluate the grouping expressions:diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rsindex f5866d5a96..c8a8be949b 100644--- a/datafusion/expr/src/logical_plan/plan.rs+++ b/datafusion/expr/src/logical_plan/plan.rs@@ -1620,7 +1620,7 @@ pub struct CreateExternalTable {}// Hashing refers to a subset of fields considered in PartialEq.-#[allow(clippy::derive_hash_xor_eq)]+#[allow(clippy::derived_hash_with_manual_eq)]impl Hash for CreateExternalTable {fn hash<H: Hasher>(&self, state: &mut H) {self.schema.hash(state);@@ -1719,7 +1719,7 @@ pub struct Analyze {}/// Extension operator defined outside of DataFusion-#[allow(clippy::derive_hash_xor_eq)] // see impl PartialEq for explanation+#[allow(clippy::derived_hash_with_manual_eq)] // see impl PartialEq for explanation#[derive(Clone, Eq, Hash)]pub struct Extension {/// The runtime extension operatordiff --git a/datafusion/physical-expr/src/aggregate/count_distinct.rs b/datafusion/physical-expr/src/aggregate/count_distinct.rsindex df4a9ab7b9..89a464bc0c 100644--- a/datafusion/physical-expr/src/aggregate/count_distinct.rs+++ b/datafusion/physical-expr/src/aggregate/count_distinct.rs@@ -112,7 +112,7 @@ impl DistinctCountAccumulator {.values.iter().next()- .map(|vals| ScalarValue::size(vals) - std::mem::size_of_val(&vals))+ .map(|vals| ScalarValue::size(vals) - std::mem::size_of_val(vals)).unwrap_or(0)}}diff --git a/datafusion/sql/src/expr/arrow_cast.rs b/datafusion/sql/src/expr/arrow_cast.rsindex bc1313e2c1..49104ee05d 100644--- a/datafusion/sql/src/expr/arrow_cast.rs+++ b/datafusion/sql/src/expr/arrow_cast.rs@@ -127,10 +127,10 @@ impl<'a> Parser<'a> {let data_type = self.parse_next_type()?;// ensure that there is no trailing contentif self.tokenizer.next().is_some() {- return Err(make_error(+ Err(make_error(self.val,&format!("checking trailing content after parsing '{data_type}'"),- ));+ ))} else {Ok(data_type)}