Returns true if both operands are Date types (Date32 or Date64) Used to detect Date - Date operations which should return Int64 (days difference)
(lhs: &DataType, rhs: &DataType)
| 171 | /// Returns true if both operands are Date types (Date32 or Date64) |
| 172 | /// Used to detect Date - Date operations which should return Int64 (days difference) |
| 173 | fn is_date_minus_date(lhs: &DataType, rhs: &DataType) -> bool { |
| 174 | matches!( |
| 175 | (lhs, rhs), |
| 176 | (DataType::Date32, DataType::Date32) | (DataType::Date64, DataType::Date64) |
| 177 | ) |
| 178 | } |
| 179 | |
| 180 | /// Computes the difference between two dates and returns the result as Int64 (days) |
| 181 | /// This aligns with PostgreSQL, DuckDB, and MySQL behavior where date - date returns an integer |
no outgoing calls
no test coverage detected
searching dependent graphs…