-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
> select interval '1 YEAR'
Arrow error: Not yet implemented: Unsupported Interval Expression with value "1 YEAR seconds"
however use lowercase is ok.
> select interval '1 year'
+--------------------------------------------------------+
| IntervalMonthDayNano("950737950171172051122527404032") |
+--------------------------------------------------------+
| 0 years 12 mons 0 days 0 hours 0 mins 0.000000000 secs |
+--------------------------------------------------------+
I try other databases such as duckdb and postgres, and uppercase style is ok.
To Reproduce
use datafusion-cli and select interval '1 YEAR'
DataFusion CLI v33.0.0
Expected behavior
ouput the right result.
Additional context
The reason may be because https://github.com/apache/arrow-datafusion/blob/main/datafusion/sql/src/expr/value.rs#L319
the has_units function just check the lowercase style, and I think add to_lowercase in it can solve this problem.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working