Acfboy commented on code in PR #20241:
URL: https://github.com/apache/datafusion/pull/20241#discussion_r2791126792
##########
datafusion/expr-common/src/type_coercion/binary/tests/arithmetic.rs:
##########
@@ -228,6 +228,37 @@ fn test_type_coercion_arithmetic() -> Result<()> {
Ok(())
}
+#[test]
+fn test_bitwise_coercion_float_types_error() -> Result<()> {
+ let err = BinaryTypeCoercer::new(
+ &DataType::Float32,
+ &Operator::BitwiseAnd,
+ &DataType::Float32,
+ )
+ .get_input_types()
+ .unwrap_err()
+ .to_string();
+ assert_contains!(
+ &err,
+ "Cannot infer common type for bitwise operation Float32 & Float32"
+ );
+
+ let err = BinaryTypeCoercer::new(
+ &DataType::Float32,
+ &Operator::BitwiseAnd,
+ &DataType::Float64,
+ )
+ .get_input_types()
+ .unwrap_err()
+ .to_string();
+ assert_contains!(
+ &err,
+ "Cannot infer common type for bitwise operation Float32 & Float64"
+ );
+
+ Ok(())
+}
+
Review Comment:
Tests for Decimals and Dictionary are added, thanks.
--
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]