From 5bdfe3f6a1e53fb8617f66d2a97824b700f3956e Mon Sep 17 00:00:00 2001 From: Eduard Karacharov Date: Sat, 4 Nov 2023 15:44:36 +0300 Subject: [PATCH] fmt & clippy warns fixed --- datafusion/physical-plan/src/joins/hash_join.rs | 4 +++- datafusion/physical-plan/src/lib.rs | 1 + datafusion/physical-plan/src/test/exec.rs | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/datafusion/physical-plan/src/joins/hash_join.rs b/datafusion/physical-plan/src/joins/hash_join.rs index 521509697469..ef1f93b1cd0c 100644 --- a/datafusion/physical-plan/src/joins/hash_join.rs +++ b/datafusion/physical-plan/src/joins/hash_join.rs @@ -1323,7 +1323,9 @@ mod tests { use arrow::array::{ArrayRef, Date32Array, Int32Array, UInt32Builder, UInt64Builder}; use arrow::datatypes::{DataType, Field, Schema}; - use datafusion_common::{assert_batches_eq, assert_batches_sorted_eq, assert_contains, ScalarValue}; + use datafusion_common::{ + assert_batches_eq, assert_batches_sorted_eq, assert_contains, ScalarValue, + }; use datafusion_execution::config::SessionConfig; use datafusion_execution::runtime_env::{RuntimeConfig, RuntimeEnv}; use datafusion_expr::Operator; diff --git a/datafusion/physical-plan/src/lib.rs b/datafusion/physical-plan/src/lib.rs index 16b7f860b421..081916f4f42d 100644 --- a/datafusion/physical-plan/src/lib.rs +++ b/datafusion/physical-plan/src/lib.rs @@ -555,6 +555,7 @@ pub fn unbounded_output(plan: &Arc) -> bool { } #[cfg(test)] +#[allow(clippy::single_component_path_imports)] use rstest_reuse; pub mod test; diff --git a/datafusion/physical-plan/src/test/exec.rs b/datafusion/physical-plan/src/test/exec.rs index 71e6cba6741e..fcc0cf6b7af8 100644 --- a/datafusion/physical-plan/src/test/exec.rs +++ b/datafusion/physical-plan/src/test/exec.rs @@ -61,7 +61,7 @@ impl BatchIndex { /// Iterator over batches #[derive(Debug, Default)] -pub(crate) struct TestStream { +pub struct TestStream { /// Vector of record batches data: Vec, /// Index into the data that has been returned so far @@ -684,7 +684,7 @@ pub struct PanicExec { } impl PanicExec { - /// Create new [`PanickingExec`] with a give schema and number of + /// Create new [`PanicExec`] with a give schema and number of /// partitions, which will each panic immediately. pub fn new(schema: SchemaRef, n_partitions: usize) -> Self { Self { @@ -708,7 +708,7 @@ impl DisplayAs for PanicExec { ) -> std::fmt::Result { match t { DisplayFormatType::Default | DisplayFormatType::Verbose => { - write!(f, "PanickingExec",) + write!(f, "PanicExec",) } } }