-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
I found this while working on #1153
Trying to do a boolean operation with eq or != results in an error such as:
ArrowError(ExternalError(Internal("Data type Boolean not supported for binary operation on dyn arrays")))
To Reproduce
echo "true" > /tmp/foo.csv
echo "false" >> /tmp/foo.csv
cargo run --bin datafusion-cliThen run SQL:
CREATE EXTERNAL TABLE foo(x boolean)
STORED AS CSV
LOCATION '/tmp/foo.csv';
> select * from foo;
+-------+
| x |
+-------+
| true |
| false |
+-------+
2 rows in set. Query took 0.010 seconds.
> select x != x from foo;
ArrowError(ExternalError(Internal("Data type Boolean not supported for binary operation on dyn arrays")))Expected behavior
Expect the query to run and the a result of two columns of false values
Additional context
The reason it is a problem for constant folding, is that there is special case code to handle constant true != false type expressions but it doesn't work with the general purpose constant evaluator.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request