From c976ad1dfdc000f53832fabd4724c13c12a1aadd Mon Sep 17 00:00:00 2001 From: Jeffrey Smith II Date: Thu, 30 May 2024 11:20:20 -0400 Subject: [PATCH] chore: lint/fmt --- .../core/src/datasource/physical_plan/parquet/row_filter.rs | 6 +++--- datafusion/core/src/datasource/schema_adapter.rs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/datafusion/core/src/datasource/physical_plan/parquet/row_filter.rs b/datafusion/core/src/datasource/physical_plan/parquet/row_filter.rs index 2c00b45fa297..1d0826664ea6 100644 --- a/datafusion/core/src/datasource/physical_plan/parquet/row_filter.rs +++ b/datafusion/core/src/datasource/physical_plan/parquet/row_filter.rs @@ -524,12 +524,12 @@ mod test { .expect("building candidate") .expect("candidate expected"); - let schema_adapter = DefaultSchemaAdapterFactory{}.create(Arc::new(table_schema)); + let schema_adapter = + DefaultSchemaAdapterFactory {}.create(Arc::new(table_schema)); let (schema_mapping, _) = schema_adapter .map_schema(&file_schema) .expect("creating schema mapping"); - let mut row_filter = DatafusionArrowPredicate::try_new( candidate, &file_schema, @@ -560,7 +560,7 @@ mod test { let filtered = row_filter.evaluate(record_batch); - assert!(matches!(filtered, Ok(_))); + assert!(filtered.is_ok()); } #[test] diff --git a/datafusion/core/src/datasource/schema_adapter.rs b/datafusion/core/src/datasource/schema_adapter.rs index c1cb8140efb7..8b90309e9425 100644 --- a/datafusion/core/src/datasource/schema_adapter.rs +++ b/datafusion/core/src/datasource/schema_adapter.rs @@ -372,7 +372,10 @@ mod tests { Ok(RecordBatch::try_new(schema, new_columns).unwrap()) } - fn map_partial_batch(&self, batch: RecordBatch) -> datafusion_common::Result { + fn map_partial_batch( + &self, + batch: RecordBatch, + ) -> datafusion_common::Result { self.map_batch(batch) } }