From f56d6d033adc67c18eb5eca1d5429e90a231eb39 Mon Sep 17 00:00:00 2001 From: waruto Date: Mon, 9 Sep 2024 21:04:59 +0800 Subject: [PATCH] remove redundant usage of clone (#12392) --- .../core/src/datasource/physical_plan/parquet/opener.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datafusion/core/src/datasource/physical_plan/parquet/opener.rs b/datafusion/core/src/datasource/physical_plan/parquet/opener.rs index 4edc0ac525de..7e331293eb19 100644 --- a/datafusion/core/src/datasource/physical_plan/parquet/opener.rs +++ b/datafusion/core/src/datasource/physical_plan/parquet/opener.rs @@ -77,8 +77,9 @@ impl FileOpener for ParquetOpener { )?; let batch_size = self.batch_size; - let projection = self.projection.clone(); - let projected_schema = SchemaRef::from(self.table_schema.project(&projection)?); + + let projected_schema = + SchemaRef::from(self.table_schema.project(&self.projection)?); let schema_adapter = self.schema_adapter_factory.create(projected_schema); let predicate = self.predicate.clone(); let pruning_predicate = self.pruning_predicate.clone();