Skip to content
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

InList expr with NULL literals do not work #1190

Closed
alamb opened this issue Oct 28, 2021 · 1 comment
Closed

InList expr with NULL literals do not work #1190

alamb opened this issue Oct 28, 2021 · 1 comment

Comments

@alamb
Copy link
Contributor

alamb commented Oct 28, 2021

No description provided.

@alamb
Copy link
Contributor Author

alamb commented Oct 28, 2021

Actually, I tried several variations and Inlist works well!

echo "1" > /tmp/foo.csv
cargo run -p datafusion-cli
CREATE EXTERNAL TABLE foo(x int)
STORED AS CSV
LOCATION '/tmp/foo.csv';

> SELECT NULL in (1, 2);
+---------------+
| Boolean(NULL) |
+---------------+
|               |
+---------------+
1 row in set. Query took 0.002 seconds.
> SELECT NULL in (NULL, 2);
+---------------+
| Boolean(NULL) |
+---------------+
|               |
+---------------+
1 row in set. Query took 0.002 seconds.
> SELECT 1 in (NULL, 2);
+---------------+
| Boolean(NULL) |
+---------------+
|               |
+---------------+
1 row in set. Query took 0.002 seconds.
> SELECT x in (NULL, 2);
Plan("Invalid identifier '#x' for schema ")
> SELECT x in (NULL, 2) from foo;
+-------------------------------------------------------+
| foo.x IN (Map { iter: Iter([Utf8(NULL), Int64(2)]) }) |
+-------------------------------------------------------+
|                                                       |
+-------------------------------------------------------+
1 row in set. Query took 0.011 seconds.

@alamb alamb closed this as completed Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant