milevin commented on code in PR #13741: URL: https://github.com/apache/datafusion/pull/13741#discussion_r1881601707
########## datafusion/expr-common/src/type_coercion/binary.rs: ########## @@ -1869,6 +1905,51 @@ mod tests { Operator::Multiply, DataType::Float64 ); + + // Test integer to interval coercion for temporal arithmetic + test_coercion_assymetric_binary_rule!( + DataType::Int32, + DataType::Timestamp(TimeUnit::Nanosecond, None), + Operator::Plus, + DataType::Interval(IntervalUnit::DayTime), + DataType::Timestamp(TimeUnit::Nanosecond, None) + ); + test_coercion_assymetric_binary_rule!( + DataType::Timestamp(TimeUnit::Nanosecond, None), + DataType::Int64, + Operator::Plus, + DataType::Timestamp(TimeUnit::Nanosecond, None), + DataType::Interval(IntervalUnit::DayTime) + ); + test_coercion_assymetric_binary_rule!( + DataType::Int32, + DataType::Date32, Review Comment: Probably not. Could be done -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org