Skip to content

Interval Literal doesn't work for timeunit less than millisecond #3204

@waitingkuo

Description

@waitingkuo

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

It works for millisecond

select interval '1 month 0.001 second';
+-------------------------------------------------------+
| IntervalMonthDayNano("79228162514264337593544950336") |
+-------------------------------------------------------+
| 0 years 1 mons 0 days 0 hours 0 mins 0.1000000 secs   |
+-------------------------------------------------------+
1 row in set. Query took 0.001 seconds.

but doesn't work while the unit for second less than millisecond

select interval '1 month 0.0001 second';
+------------------------------------------------+
| IntervalYearMonth("1")                         |
+------------------------------------------------+
| 0 years 1 mons 0 days 0 hours 0 mins 0.00 secs |
+------------------------------------------------+
1 row in set. Query took 0.002 seconds.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions