Skip to content

Commit 46f4024

Browse files
authored
fix no effect metrics (#15460)
1 parent 86db4bf commit 46f4024

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

datafusion/datasource-parquet/src/source.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,9 @@ impl ParquetSource {
296296
self
297297
}
298298

299-
fn with_metrics(&self, metrics: ExecutionPlanMetricsSet) -> Self {
300-
let mut conf = self.clone();
301-
conf.metrics = metrics;
302-
conf
299+
fn with_metrics(mut self, metrics: ExecutionPlanMetricsSet) -> Self {
300+
self.metrics = metrics;
301+
self
303302
}
304303

305304
/// Set predicate information, also sets pruning_predicate and page_pruning_predicate attributes
@@ -314,7 +313,7 @@ impl ParquetSource {
314313
let predicate_creation_errors =
315314
MetricBuilder::new(&metrics).global_counter("num_predicate_creation_errors");
316315

317-
conf.with_metrics(metrics);
316+
conf = conf.with_metrics(metrics);
318317
conf.predicate = Some(Arc::clone(&predicate));
319318

320319
match PruningPredicate::try_new(Arc::clone(&predicate), Arc::clone(&file_schema))

0 commit comments

Comments
 (0)