Skip to content

Commit

Permalink
[ES|QL] Add support for =~ operator (elastic#174732)
Browse files Browse the repository at this point in the history
## Summary

Keep in sync with new ES|QL builtin function addition:
elastic/elasticsearch#103656

Do not merge until the related ER PR is still in review.

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
  • Loading branch information
dej611 authored and fkanout committed Mar 4, 2024
1 parent 1d04258 commit 61d4f5e
Show file tree
Hide file tree
Showing 15 changed files with 953 additions and 876 deletions.
1 change: 1 addition & 0 deletions packages/kbn-monaco/src/esql/antlr/esql_lexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ RP : ')';
TRUE : T R U E;

EQ : '==';
CIEQ : '=~';
NEQ : '!=';
LT : '<';
LTE : '<=';
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-monaco/src/esql/antlr/esql_lexer.interp

Large diffs are not rendered by default.

130 changes: 66 additions & 64 deletions packages/kbn-monaco/src/esql/antlr/esql_lexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -50,58 +50,59 @@ RLIKE=49
RP=50
TRUE=51
EQ=52
NEQ=53
LT=54
LTE=55
GT=56
GTE=57
PLUS=58
MINUS=59
ASTERISK=60
SLASH=61
PERCENT=62
OPENING_BRACKET=63
CLOSING_BRACKET=64
UNQUOTED_IDENTIFIER=65
QUOTED_IDENTIFIER=66
EXPR_LINE_COMMENT=67
EXPR_MULTILINE_COMMENT=68
EXPR_WS=69
METADATA=70
FROM_UNQUOTED_IDENTIFIER=71
FROM_LINE_COMMENT=72
FROM_MULTILINE_COMMENT=73
FROM_WS=74
UNQUOTED_ID_PATTERN=75
PROJECT_LINE_COMMENT=76
PROJECT_MULTILINE_COMMENT=77
PROJECT_WS=78
AS=79
RENAME_LINE_COMMENT=80
RENAME_MULTILINE_COMMENT=81
RENAME_WS=82
ON=83
WITH=84
ENRICH_POLICY_NAME=85
ENRICH_LINE_COMMENT=86
ENRICH_MULTILINE_COMMENT=87
ENRICH_WS=88
ENRICH_FIELD_LINE_COMMENT=89
ENRICH_FIELD_MULTILINE_COMMENT=90
ENRICH_FIELD_WS=91
MVEXPAND_LINE_COMMENT=92
MVEXPAND_MULTILINE_COMMENT=93
MVEXPAND_WS=94
INFO=95
FUNCTIONS=96
SHOW_LINE_COMMENT=97
SHOW_MULTILINE_COMMENT=98
SHOW_WS=99
COLON=100
SETTING=101
SETTING_LINE_COMMENT=102
SETTTING_MULTILINE_COMMENT=103
SETTING_WS=104
CIEQ=53
NEQ=54
LT=55
LTE=56
GT=57
GTE=58
PLUS=59
MINUS=60
ASTERISK=61
SLASH=62
PERCENT=63
OPENING_BRACKET=64
CLOSING_BRACKET=65
UNQUOTED_IDENTIFIER=66
QUOTED_IDENTIFIER=67
EXPR_LINE_COMMENT=68
EXPR_MULTILINE_COMMENT=69
EXPR_WS=70
METADATA=71
FROM_UNQUOTED_IDENTIFIER=72
FROM_LINE_COMMENT=73
FROM_MULTILINE_COMMENT=74
FROM_WS=75
UNQUOTED_ID_PATTERN=76
PROJECT_LINE_COMMENT=77
PROJECT_MULTILINE_COMMENT=78
PROJECT_WS=79
AS=80
RENAME_LINE_COMMENT=81
RENAME_MULTILINE_COMMENT=82
RENAME_WS=83
ON=84
WITH=85
ENRICH_POLICY_NAME=86
ENRICH_LINE_COMMENT=87
ENRICH_MULTILINE_COMMENT=88
ENRICH_WS=89
ENRICH_FIELD_LINE_COMMENT=90
ENRICH_FIELD_MULTILINE_COMMENT=91
ENRICH_FIELD_WS=92
MVEXPAND_LINE_COMMENT=93
MVEXPAND_MULTILINE_COMMENT=94
MVEXPAND_WS=95
INFO=96
FUNCTIONS=97
SHOW_LINE_COMMENT=98
SHOW_MULTILINE_COMMENT=99
SHOW_WS=100
COLON=101
SETTING=102
SETTING_LINE_COMMENT=103
SETTTING_MULTILINE_COMMENT=104
SETTING_WS=105
'|'=26
'='=33
','=34
Expand All @@ -110,15 +111,16 @@ SETTING_WS=104
'?'=48
')'=50
'=='=52
'!='=53
'<'=54
'<='=55
'>'=56
'>='=57
'+'=58
'-'=59
'*'=60
'/'=61
'%'=62
']'=64
':'=100
'=~'=53
'!='=54
'<'=55
'<='=56
'>'=57
'>='=58
'+'=59
'-'=60
'*'=61
'/'=62
'%'=63
']'=65
':'=101
Loading

0 comments on commit 61d4f5e

Please sign in to comment.