This is an automated email from the ASF dual-hosted git repository.
dheres 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 e93f8e13a7 clean up the code based on Clippy (#8359)
e93f8e13a7 is described below
commit e93f8e13a7f34f1d17f299ffcc1cbb103246d602
Author: Alex Huang <[email protected]>
AuthorDate: Wed Nov 29 17:40:49 2023 +0100
clean up the code based on Clippy (#8359)
---
datafusion/optimizer/src/optimize_projections.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/datafusion/optimizer/src/optimize_projections.rs
b/datafusion/optimizer/src/optimize_projections.rs
index 1e98ee76d2..b6d026279a 100644
--- a/datafusion/optimizer/src/optimize_projections.rs
+++ b/datafusion/optimizer/src/optimize_projections.rs
@@ -381,7 +381,7 @@ fn merge_consecutive_projections(proj: &Projection) ->
Result<Option<Projection>
.flat_map(|expr| expr.to_columns())
.fold(HashMap::new(), |mut map, cols| {
cols.into_iter()
- .for_each(|col| *map.entry(col.clone()).or_default() += 1);
+ .for_each(|col| *map.entry(col).or_default() += 1);
map
});
@@ -827,7 +827,7 @@ fn rewrite_projection_given_requirements(
if &projection_schema(&input, &exprs_used)? == input.schema() {
Ok(Some(input))
} else {
- let new_proj = Projection::try_new(exprs_used,
Arc::new(input.clone()))?;
+ let new_proj = Projection::try_new(exprs_used, Arc::new(input))?;
let new_proj = LogicalPlan::Projection(new_proj);
Ok(Some(new_proj))
}