-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
in_list expression not working #6073
Comments
Hello, @bubbajoe. |
@izveigor sSorry I am a bit confused, can you give an SQL example? |
@bubbajoe, the document you linked is not for SQL functions. SQL scalar and aggregate functions can be found at https://arrow.apache.org/datafusion/user-guide/sql/scalar_functions.html#. I believe we do not have an SQL function to check an expression is in an array. Maybe you can give us some suggestions. If you have used similar functions in other engines, it could help us implement a similar functionality. |
@bubbajoe, I don’t check but I think in your case you can use “IN”: “SELECT ‘word’ IN list;” |
@jiangzhx Basically some of the functions and operators here: The most important being: array_length(anyarray), unnest(anyarray), and checking if an item is in an array. Example: ( BTW this query seems to parse correctly in datafusion, i just get an Unsupported/implemented error. I would perfer this way instead of something like array_contains(anyarray, anyelement) This is the error i get: |
@izveigor Doesn't even parse the sql, it would need something like |
Let me close this issue since in_list isn't here: https://arrow.apache.org/datafusion/user-guide/sql/scalar_functions.html Thanks for the clarification! |
Describe the bug
I am getting an error when i try to use the in_list expression:
"Error during planning: Invalid function 'in_list'"
documentation link
To Reproduce
I am running this query in
SessionContext::sql
btwselect in_list('word', list) from data
where list is a utf8 array
Expected behavior
to return 'true'
The text was updated successfully, but these errors were encountered: