This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 841a9a6e41 Minor: clean up the code based on clippy (#8179)
841a9a6e41 is described below

commit 841a9a6e4120395ed3df3423b2831531ba8a3fad
Author: Alex Huang <[email protected]>
AuthorDate: Wed Nov 15 16:02:21 2023 +0100

    Minor: clean up the code based on clippy (#8179)
---
 datafusion/physical-expr/src/array_expressions.rs | 8 ++++----
 datafusion/physical-plan/src/filter.rs            | 2 +-
 datafusion/sql/src/select.rs                      | 6 +-----
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/datafusion/physical-expr/src/array_expressions.rs 
b/datafusion/physical-expr/src/array_expressions.rs
index 6415bd5391..01d495ee7f 100644
--- a/datafusion/physical-expr/src/array_expressions.rs
+++ b/datafusion/physical-expr/src/array_expressions.rs
@@ -1440,7 +1440,7 @@ fn union_generic_lists<OffsetSize: OffsetSizeTrait>(
     r: &GenericListArray<OffsetSize>,
     field: &FieldRef,
 ) -> Result<GenericListArray<OffsetSize>> {
-    let converter = 
RowConverter::new(vec![SortField::new(l.value_type().clone())])?;
+    let converter = RowConverter::new(vec![SortField::new(l.value_type())])?;
 
     let nulls = NullBuffer::union(l.nulls(), r.nulls());
     let l_values = l.values().clone();
@@ -1494,14 +1494,14 @@ pub fn array_union(args: &[ArrayRef]) -> 
Result<ArrayRef> {
         (DataType::Null, _) => Ok(array2.clone()),
         (_, DataType::Null) => Ok(array1.clone()),
         (DataType::List(field_ref), DataType::List(_)) => {
-            check_datatypes("array_union", &[&array1, &array2])?;
+            check_datatypes("array_union", &[array1, array2])?;
             let list1 = array1.as_list::<i32>();
             let list2 = array2.as_list::<i32>();
             let result = union_generic_lists::<i32>(list1, list2, field_ref)?;
             Ok(Arc::new(result))
         }
         (DataType::LargeList(field_ref), DataType::LargeList(_)) => {
-            check_datatypes("array_union", &[&array1, &array2])?;
+            check_datatypes("array_union", &[array1, array2])?;
             let list1 = array1.as_list::<i64>();
             let list2 = array2.as_list::<i64>();
             let result = union_generic_lists::<i64>(list1, list2, field_ref)?;
@@ -1985,7 +1985,7 @@ pub fn array_intersect(args: &[ArrayRef]) -> 
Result<ArrayRef> {
     if first_array.value_type() != second_array.value_type() {
         return internal_err!("array_intersect is not implemented for 
'{first_array:?}' and '{second_array:?}'");
     }
-    let dt = first_array.value_type().clone();
+    let dt = first_array.value_type();
 
     let mut offsets = vec![0];
     let mut new_arrays = vec![];
diff --git a/datafusion/physical-plan/src/filter.rs 
b/datafusion/physical-plan/src/filter.rs
index 822ddfdf3e..52bff880b1 100644
--- a/datafusion/physical-plan/src/filter.rs
+++ b/datafusion/physical-plan/src/filter.rs
@@ -201,7 +201,7 @@ impl ExecutionPlan for FilterExec {
             // tracking issue for making this configurable:
             // https://github.com/apache/arrow-datafusion/issues/8133
             let selectivity = 0.2_f32;
-            let mut stats = input_stats.clone().into_inexact();
+            let mut stats = input_stats.into_inexact();
             if let Precision::Inexact(n) = stats.num_rows {
                 stats.num_rows = Precision::Inexact((selectivity * n as f32) 
as usize);
             }
diff --git a/datafusion/sql/src/select.rs b/datafusion/sql/src/select.rs
index 31333affe0..356c536051 100644
--- a/datafusion/sql/src/select.rs
+++ b/datafusion/sql/src/select.rs
@@ -245,11 +245,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                 let on_expr = on_expr
                     .into_iter()
                     .map(|e| {
-                        self.sql_expr_to_logical_expr(
-                            e.clone(),
-                            plan.schema(),
-                            planner_context,
-                        )
+                        self.sql_expr_to_logical_expr(e, plan.schema(), 
planner_context)
                     })
                     .collect::<Result<Vec<_>>>()?;
 

Reply via email to