Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/134029.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 134029
summary: Add SET instruction
area: ES|QL
type: enhancement
issues: []
1 change: 1 addition & 0 deletions x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import ChangePoint,
MvExpand,
Project,
Rename,
Set,
Show,
UnknownCommand;

Expand Down
309 changes: 158 additions & 151 deletions x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ options {
import Expression,
Join;

statements
: {this.isDevVersion()}? setCommand+ singleStatement EOF
| singleStatement EOF
;
Comment on lines +27 to +29
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will become

statements
    : setCommand* singleStatement EOF
    ;

as soon as it's out of dev mode


singleStatement
: query EOF
;
Expand Down Expand Up @@ -333,3 +338,16 @@ insistCommand
fuseCommand
: DEV_FUSE
;

setCommand
: SET setFields SEMICOLON
;

setFields

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure we do not need this one

: setField (COMMA setField)*
;

setField
: identifier ASSIGN constant
;

Loading