-
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 team
Description
We need to add support for the subset of functions that EQL supports. Some of these may already exist from SQL, and we may need to create additional ones.
The full list is below:
elasticsearch/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/parser/EqlParser.java
Lines 134 to 153 in 6f1890b
| switch (functionName) { | |
| case "add": | |
| case "between": | |
| case "cidrMatch": | |
| case "concat": | |
| case "divide": | |
| case "endsWith": | |
| case "indexOf": | |
| case "length": | |
| case "match": | |
| case "modulo": | |
| case "multiply": | |
| case "number": | |
| case "startsWith": | |
| case "string": | |
| case "stringContains": | |
| case "substring": | |
| case "subtract": | |
| case "wildcard": | |
| break; |
Math functions were created before EQL had math operators. These should be easy to do, and can probably be done together
- add
(number, number) -> numberEQL: implement math functions: add, divide, module, multiply, subtract #54846 - divide
(number, number) -> numberEQL: implement math functions: add, divide, module, multiply, subtract #54846 - modulo
(number, number) -> numberEQL: implement math functions: add, divide, module, multiply, subtract #54846 - multiply
(number, number) -> numberEQL: implement math functions: add, divide, module, multiply, subtract #54846 - subtract
(number, number) -> numberEQL: implement math functions: add, divide, module, multiply, subtract #54846
Tracking remaining functions to be implemented
- between
(str, str, str [, bool, bool]) -> strEQL: implement between function #54135 - cidrMatch
(ip, static cidr, ...) -> bool(convert to IP field match) EQL: implement cidrMatch function #54132 - concat
(object, ...) -> strEQL: implement concat function #55185 - endsWith
(str, str) -> boolEQL: implement endsWith function #53854 - indexOf
(str, str [, int]) -> int|nullEQL: implement indexOf function #53856 - length
(str | array) -> intEQL: implement length function #53853 - match
(str, static str, ...) -> boolEQL: Add match function implementation #55182 - number
(str, [int]) -> numberEQL: implement number function #54471 - startsWith
(str, str) -> boolEQL: implement startsWith function #53855 - string
(object) -> strEQL: Add string function #54470 - stringContains
(str, str) -> boolEQL: implement stringContains function #54136 - substring
(str, int [, int]) -> str)(we may need to adjust for EQL's zero and negative-indexing into strings)EQL: Add Substring function with Python semantics #53688 - wildcard
(str, static str, ...) -> bool(convert to Likes) -EQL: Convert wildcards to LIKE in analyzer #51901and EQL: Add wildcard function #54020
Metadata
Metadata
Assignees
Labels
:Analytics/EQLEQL queryingEQL queryingTeam:QL (Deprecated)Meta label for query languages teamMeta label for query languages team