-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
I can not write a query that uses between in the select list of a sql query
To Reproduce
echo "1" > /tmp/foo.csv
cargo run -p datafusion-cliCREATE EXTERNAL TABLE foo(x int)
STORED AS CSV
LOCATION '/tmp/foo.csv';> select 1 between 5 and 10;
NotImplemented("Create name does not support logical expression Utf8(NULL) BETWEEN Int64(5) AND Utf8(NULL)")
> select 1 between 5 and 10 from foo;
NotImplemented("Create name does not support logical expression Int64(1) BETWEEN Int64(5) AND Int64(10)")Expected behavior
I expect a single row false to be returned
Workaround
Use an alias:
> select 1 between 5 and 10 as my_expr;
+---------+
| my_expr |
+---------+
| false |
+---------+
1 row in set. Query took 0.002 seconds.
> select 1 between 5 and 10 as my_expr from foo;
+---------+
| my_expr |
+---------+
| false |
+---------+
1 row in set. Query took 0.011 seconds.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers