Skip to content

interval .. syntax does not work in SQL VALUES clause #5802

Description

@alamb

Describe the bug

I can not use interval .. syntax in SQL VALUES clauses

To Reproduce

create table t (i interval) as values (interval '5 days 3 nanoseconds');

Results in

DataFusion error: This feature is not implemented: Unsupported value Interval \{ value: Value\(SingleQuotedString\("5 days 3 nanoseconds"\)\), leading_field: None, leading_precision: None, last_field: None, fractional_seconds_precision: None \} in a values list expression

Expected behavior

I expect it to work like

❯ create table t (i interval) as values ('5 days 3 nanoseconds'::interval);
0 rows in set. Query took 0.002 seconds.

❯ show columns in t;
+---------------+--------------+------------+-------------+------------------------+-------------+
| table_catalog | table_schema | table_name | column_name | data_type              | is_nullable |
+---------------+--------------+------------+-------------+------------------------+-------------+
| datafusion    | public       | t          | i           | Interval(MonthDayNano) | YES         |
+---------------+--------------+------------+-------------+------------------------+-------------+

### Additional context

_No response_

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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