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

SQL : Support 'IN' clause #34622

Closed
Johnb21 opened this issue Oct 18, 2018 · 1 comment
Closed

SQL : Support 'IN' clause #34622

Johnb21 opened this issue Oct 18, 2018 · 1 comment

Comments

@Johnb21
Copy link

Johnb21 commented Oct 18, 2018

Currently, there is no ability to use the 'IN' clause within an elasticsearch SQL statement. The error returned is:

{ "error": { "root_cause": [ { "type": "sql_illegal_argument_exception", "reason": "Don't know how to translate In In[field_name{f}#530,[value]]" } ], "type": "sql_illegal_argument_exception", "reason": "Don't know how to translate In In[field_name{f}#530,[value]]" }, "status": 500 }

Under the hood, this would translate into a terms condition with the field name and a comma separated array for the value:

'terms': { 'field_name.keyword': [comma,separated,values], }

@andyb-elastic
Copy link
Contributor

Hi, implementation of IN with a list of values is in progress (#32955, #34581) so I'm going to close this. If those issues don't cover the use case you have in mind, can you provide more detail and we'll re-open this issue. Thanks

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

2 participants