Skip to content

Commit e24fd32

Browse files
authored
[ES|QL] Enable the completion command as a tech preview feature (#128948)
1 parent 3f03775 commit e24fd32

File tree

13 files changed

+1809
-1851
lines changed

13 files changed

+1809
-1851
lines changed

docs/changelog/128948.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 128948
2+
summary: ES|QL - Add COMPLETION command as a tech preview feature
3+
area: ES|QL
4+
type: feature
5+
issues:
6+
- 124405

x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ processingCommand
5656
| mvExpandCommand
5757
| joinCommand
5858
| changePointCommand
59+
| completionCommand
5960
// in development
6061
| {this.isDevVersion()}? inlinestatsCommand
6162
| {this.isDevVersion()}? lookupCommand
62-
| {this.isDevVersion()}? completionCommand
6363
| {this.isDevVersion()}? insistCommand
6464
| {this.isDevVersion()}? forkCommand
6565
| {this.isDevVersion()}? rerankCommand
@@ -308,7 +308,7 @@ rerankCommand
308308
;
309309

310310
completionCommand
311-
: DEV_COMPLETION prompt=primaryExpression WITH inferenceId=identifierOrParameter (AS targetField=qualifiedName)?
311+
: COMPLETION prompt=primaryExpression WITH inferenceId=identifierOrParameter (AS targetField=qualifiedName)?
312312
;
313313

314314
sampleCommand

x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/antlr/lexer/Expression.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ lexer grammar Expression;
99
//
1010
// Expression - used by many commands
1111
//
12+
COMPLETION : 'completion' -> pushMode(EXPRESSION_MODE);
1213
DISSECT : 'dissect' -> pushMode(EXPRESSION_MODE);
1314
EVAL : 'eval' -> pushMode(EXPRESSION_MODE);
1415
GROK : 'grok' -> pushMode(EXPRESSION_MODE);
@@ -18,7 +19,6 @@ SORT : 'sort' -> pushMode(EXPRESSION_MODE);
1819
STATS : 'stats' -> pushMode(EXPRESSION_MODE);
1920
WHERE : 'where' -> pushMode(EXPRESSION_MODE);
2021

21-
DEV_COMPLETION : {this.isDevVersion()}? 'completion' -> pushMode(EXPRESSION_MODE);
2222
DEV_INLINESTATS : {this.isDevVersion()}? 'inlinestats' -> pushMode(EXPRESSION_MODE);
2323
DEV_RERANK : {this.isDevVersion()}? 'rerank' -> pushMode(EXPRESSION_MODE);
2424
DEV_SAMPLE : {this.isDevVersion()}? 'sample' -> pushMode(EXPRESSION_MODE);

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ public enum Cap {
925925
/**
926926
* Support for COMPLETION command
927927
*/
928-
COMPLETION(Build.current().isSnapshot()),
928+
COMPLETION,
929929

930930
/**
931931
* Allow mixed numeric types in conditional functions - case, greatest and least

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)