Skip to content

SQL : Support 'IN' clause #34622

@Johnb21

Description

@Johnb21

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], }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions