-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
bug parsing interval that contains negative values
To Reproduce
❯ select (interval '1 month -1 second');
+---------------------------------------------------+
| IntervalMonthDayNano("-1000000000") |
+---------------------------------------------------+
| 0 years -1 mons -1 days 0 hours 0 mins -1.00 secs |
+---------------------------------------------------+
1 row in set. Query took 0.002 seconds.this is a parsing issue but not a display issue, underline value is incorrect IntervalMonthDayNano("-1000000000")
Expected behavior
0 year 1 mons 0 days 0 hours 0 mins -1 secs
Additional context
the binary expression for result nanos (which is 128bit long here) is 111111111111111......... which make months and days becomes negative
negative factional seconds has display issue #4220
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working