Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #5753
alamb opened this issue Mar 30, 2023 · 0 comments · Fixed by #5813
Closed
Tracked by #5753

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

alamb opened this issue Mar 30, 2023 · 0 comments · Fixed by #5813
Labels
bug Something isn't working

Comments

@alamb
Copy link
Contributor

alamb commented Mar 30, 2023

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_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant