diff --git a/Cargo.toml b/Cargo.toml index ca13deceb3df..63bfb7fce413 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,7 +86,6 @@ arrow-ipc = { version = "53.1.0", default-features = false, features = [ arrow-ord = { version = "53.1.0", default-features = false } arrow-schema = { version = "53.1.0", default-features = false } arrow-string = { version = "53.1.0", default-features = false } -assertor = "0.0.3" async-trait = "0.1.73" bigdecimal = "=0.4.1" bytes = "1.4" diff --git a/datafusion/physical-plan/Cargo.toml b/datafusion/physical-plan/Cargo.toml index a30c93fbc08c..7fcd719539ec 100644 --- a/datafusion/physical-plan/Cargo.toml +++ b/datafusion/physical-plan/Cargo.toml @@ -68,7 +68,6 @@ rand = { workspace = true } tokio = { workspace = true } [dev-dependencies] -assertor = { workspace = true } datafusion-functions-aggregate = { workspace = true } rstest = { workspace = true } rstest_reuse = "0.7.0" diff --git a/datafusion/physical-plan/src/execution_plan.rs b/datafusion/physical-plan/src/execution_plan.rs index 7a6430d1b280..e6484452d43e 100644 --- a/datafusion/physical-plan/src/execution_plan.rs +++ b/datafusion/physical-plan/src/execution_plan.rs @@ -929,8 +929,6 @@ mod tests { use super::*; use arrow_array::{DictionaryArray, Int32Array, NullArray, RunArray}; use arrow_schema::{DataType, Field, Schema, SchemaRef}; - use assertor::assert_that; - use assertor::StringAssertion; use std::any::Any; use std::sync::Arc; @@ -1100,7 +1098,8 @@ mod tests { &vec![0], ); assert!(result.is_err()); - assert_that!(result.err().unwrap().message().as_ref()).starts_with( + assert_starts_with( + result.err().unwrap().message().as_ref(), "Invalid batch column at '0' has null but schema specifies non-nullable", ); Ok(()) @@ -1124,7 +1123,8 @@ mod tests { &vec![0], ); assert!(result.is_err()); - assert_that!(result.err().unwrap().message().as_ref()).starts_with( + assert_starts_with( + result.err().unwrap().message().as_ref(), "Invalid batch column at '0' has null but schema specifies non-nullable", ); Ok(()) @@ -1147,7 +1147,8 @@ mod tests { &vec![0], ); assert!(result.is_err()); - assert_that!(result.err().unwrap().message().as_ref()).starts_with( + assert_starts_with( + result.err().unwrap().message().as_ref(), "Invalid batch column at '0' has null but schema specifies non-nullable", ); Ok(()) @@ -1189,9 +1190,21 @@ mod tests { &vec![0], ); assert!(result.is_err()); - assert_that!(result.err().unwrap().message().as_ref()).starts_with( + assert_starts_with( + result.err().unwrap().message().as_ref(), "Invalid batch column at '0' has null but schema specifies non-nullable", ); Ok(()) } + + fn assert_starts_with(actual: impl AsRef, expected_prefix: impl AsRef) { + let actual = actual.as_ref(); + let expected_prefix = expected_prefix.as_ref(); + assert!( + actual.starts_with(expected_prefix), + "Expected '{}' to start with '{}'", + actual, + expected_prefix + ); + } }