-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Labels
bugSomething isn't workingSomething isn't workingregressionSomething that used to work no longer doesSomething that used to work no longer does
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingregressionSomething that used to work no longer doesSomething that used to work no longer does