Describe the bug
On DF 50, DATE_TRUNC function sometimes returns off-by-1 result.
To Reproduce
DataFusion CLI v50.3.0
> select d as datetime,
DATE_TRUNC('hour', d) as hour_from_column,
DATE_TRUNC('hour', (timestamp '1900-06-15 07:09:00')) as hour_from_const
from (values (timestamp '1900-06-15 07:09:00')) as T(d);
+---------------------+---------------------+---------------------+
| datetime | hour_from_column | hour_from_const |
+---------------------+---------------------+---------------------+
| 1900-06-15T07:09:00 | 1900-06-15T08:00:00 | 1900-06-15T07:00:00 |
+---------------------+---------------------+---------------------+
1 row(s) fetched.
Elapsed 0.006 seconds.
Expected behavior
hour_from_column should have the same value as hour_from_const
Additional context
No response
Describe the bug
On DF 50,
DATE_TRUNCfunction sometimes returns off-by-1 result.To Reproduce
Expected behavior
hour_from_columnshould have the same value ashour_from_constAdditional context
No response