blaginin commented on code in PR #15984:
URL: https://github.com/apache/datafusion/pull/15984#discussion_r2080589228
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -1569,37 +1810,60 @@ mod test {
let empty = empty_with_type(DataType::Boolean);
let plan =
LogicalPlan::Projection(Projection::try_new(vec![expr.clone()],
empty)?);
- let expected = "Projection: a IS TRUE\n EmptyRelation";
- assert_analyzed_plan_eq(Arc::new(TypeCoercion::new()), plan,
expected)?;
+
+ assert_analyzed_plan_eq!(
+ plan,
+ @r"
+ Projection: a IS TRUE
+ EmptyRelation
+ "
+ )?;
let empty = empty_with_type(DataType::Int64);
let plan = LogicalPlan::Projection(Projection::try_new(vec![expr],
empty)?);
- let ret = assert_analyzed_plan_eq(Arc::new(TypeCoercion::new()), plan,
"");
- let err = ret.unwrap_err().to_string();
- assert!(err.contains("Cannot infer common argument type for comparison
operation Int64 IS DISTINCT FROM Boolean"), "{err}");
+ assert_type_coercion_error(
+ plan,
+ "Cannot infer common argument type for comparison operation Int64
IS DISTINCT FROM Boolean"
Review Comment:
should those be @?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]