-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Analytics/EQLEQL queryingEQL queryingTeam:QL (Deprecated)Meta label for query languages teamMeta label for query languages teamteam-discuss
Description
Existing implementations of EQL have peg-based grammars, and as part of the design can't support chaining predicates.
For example, 1 == 1 == 1 raises a syntax error. This seems like good behavior, forcing the user to do (1 == 1) == 1.
$ eql query 'any where 1 == 1 == 1'
Error at line:1,column:18
Invalid syntax
any where 1 == 1 == 1
^Then you get this
$ eql query 'any where (1 == 1) == 1'
Error at line:1,column:11
Invalid comparison of boolean to number
any where (1 == 1) == 1
^^^^^^^^^^^^^However, for Elasticsearch, we accept this syntax. But it's not clear what it means.
(I think there's another issue here with data type validation isn't detecting a type mismatch with (bool) == long
GET logs-endpoint.alerts-default/_eql/search
{
"query": """
any where 1 == 1 == 1
"""
,
"size": 1
}GET logs-endpoint.alerts-default/_eql/search
{
"query": """
any where 1 < 2 < 3
"""
,
"size": 1
}Metadata
Metadata
Labels
:Analytics/EQLEQL queryingEQL queryingTeam:QL (Deprecated)Meta label for query languages teamMeta label for query languages teamteam-discuss