Skip to content

Commit adde122

Browse files
committed
rebase & cargo clippy
1 parent 53ebed7 commit adde122

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

datafusion/datasource-parquet/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl ParquetFileMetrics {
100100
let limit_pruned_row_groups = MetricBuilder::new(metrics)
101101
.with_new_label("filename", filename.to_string())
102102
.counter("limit_pruned_row_groups", partition);
103-
103+
104104
let row_groups_fully_matched_statistics = MetricBuilder::new(metrics)
105105
.with_new_label("filename", filename.to_string())
106106
.counter("row_groups_fully_matched_statistics", partition);

datafusion/datasource-parquet/src/row_group_filter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ impl RowGroupAccessPlanFilter {
204204
if !fully_contained_candidates_original_idx.is_empty() {
205205
// Use NotExpr to create the inverted predicate
206206
let inverted_expr =
207-
Arc::new(NotExpr::new(predicate.orig_expr().clone()));
207+
Arc::new(NotExpr::new(Arc::clone(predicate.orig_expr())));
208208
// Simplify the NOT expression (e.g., NOT(c1 = 0) -> c1 != 0)
209209
// before building the pruning predicate
210210
let mut simplifier = PhysicalExprSimplifier::new(arrow_schema);
211211
let inverted_expr = simplifier.simplify(inverted_expr).unwrap();
212212
if let Ok(inverted_predicate) = PruningPredicate::try_new(
213213
inverted_expr,
214-
predicate.schema().clone(),
214+
Arc::clone(predicate.schema()),
215215
) {
216216
let inverted_pruning_stats = RowGroupPruningStatistics {
217217
parquet_schema,

datafusion/execution/src/memory_pool/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct UnboundedMemoryPool {
3434
}
3535

3636
impl MemoryPool for UnboundedMemoryPool {
37-
fn grow(&self, _reservation: &MemoryReservation, additional: usize) {}
37+
fn grow(&self, _reservation: &MemoryReservation, _additional: usize) {}
3838

3939
fn shrink(&self, _reservation: &MemoryReservation, shrink: usize) {
4040
self.used.fetch_sub(shrink, Ordering::Relaxed);

datafusion/physical-expr/src/simplifier/not.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ pub fn simplify_not_expr_recursive(
131131
schema: &Schema,
132132
) -> Result<Transformed<Arc<dyn PhysicalExpr>>> {
133133
// First, try to simplify any NOT expressions in this expression
134-
let not_simplified = simplify_not_expr(expr.clone(), schema)?;
134+
let not_simplified = simplify_not_expr(Arc::clone(&expr), schema)?;
135135

136136
// If the expression was transformed, we might have created new opportunities for simplification
137137
if not_simplified.transformed {
138138
// Recursively simplify the result
139139
let further_simplified =
140-
simplify_not_expr_recursive(not_simplified.data.clone(), schema)?;
140+
simplify_not_expr_recursive(Arc::clone(&not_simplified.data), schema)?;
141141
if further_simplified.transformed {
142142
return Ok(Transformed::yes(further_simplified.data));
143143
} else {
@@ -202,12 +202,12 @@ mod tests {
202202
let schema = test_schema();
203203

204204
// Create NOT(NOT(b > 5))
205-
let inner_expr = Arc::new(BinaryExpr::new(
205+
let inner_expr: Arc<dyn PhysicalExpr> = Arc::new(BinaryExpr::new(
206206
col("b", &schema)?,
207207
Operator::Gt,
208208
lit(ScalarValue::Int32(Some(5))),
209209
));
210-
let inner_not = Arc::new(NotExpr::new(inner_expr.clone()));
210+
let inner_not = Arc::new(NotExpr::new(Arc::clone(&inner_expr)));
211211
let double_not = Arc::new(NotExpr::new(inner_not));
212212

213213
let result = simplify_not_expr_recursive(double_not, &schema)?;

0 commit comments

Comments
 (0)