Skip to content

Commit f48c383

Browse files
afoucretmridula-s109
authored andcommitted
ES|QL Completion command syntax change (elastic#129189)
1 parent 01de61e commit f48c383

File tree

14 files changed

+1963
-1971
lines changed

14 files changed

+1963
-1971
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/completion.csv-spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ completion using a ROW source operator
66
required_capability: completion
77

88
ROW prompt="Who is Victor Hugo?"
9-
| COMPLETION prompt WITH test_completion AS completion_output
9+
| COMPLETION completion_output = prompt WITH test_completion
1010
;
1111

1212
prompt:keyword | completion_output:keyword
@@ -18,7 +18,7 @@ completion using a ROW source operator and prompt is a multi-valued field
1818
required_capability: completion
1919

2020
ROW prompt=["Answer the following question:", "Who is Victor Hugo?"]
21-
| COMPLETION prompt WITH test_completion AS completion_output
21+
| COMPLETION completion_output = prompt WITH test_completion
2222
;
2323

2424
prompt:keyword | completion_output:keyword

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

Lines changed: 120 additions & 120 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ rerankCommand
308308
;
309309

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

314314
sampleCommand

0 commit comments

Comments
 (0)