Skip to content

Commit 317220f

Browse files
committed
Merge branch 'main' of https://github.com/elastic/elasticsearch into rerank-refactoring
2 parents d4fb250 + 62a5422 commit 317220f

File tree

28 files changed

+2485
-2763
lines changed

28 files changed

+2485
-2763
lines changed

muted-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,9 @@ tests:
577577
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
578578
method: test
579579
issue: https://github.com/elastic/elasticsearch/issues/129453
580+
- class: org.elasticsearch.server.cli.MachineDependentHeapTests
581+
method: testMlOnlyOptions
582+
issue: https://github.com/elastic/elasticsearch/issues/129236
580583

581584
# Examples:
582585
#

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ static TransportVersion def(int id) {
197197
public static final TransportVersion NONE_CHUNKING_STRATEGY_8_19 = def(8_841_0_49);
198198
public static final TransportVersion IDP_CUSTOM_SAML_ATTRIBUTES_ALLOW_LIST_8_19 = def(8_841_0_50);
199199
public static final TransportVersion SETTINGS_IN_DATA_STREAMS_8_19 = def(8_841_0_51);
200+
public static final TransportVersion ML_INFERENCE_CUSTOM_SERVICE_REMOVE_ERROR_PARSING_8_19 = def(8_841_0_52);
200201
public static final TransportVersion V_9_0_0 = def(9_000_0_09);
201202
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_1 = def(9_000_0_10);
202203
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_2 = def(9_000_0_11);
@@ -302,6 +303,7 @@ static TransportVersion def(int id) {
302303
public static final TransportVersion SECURITY_CLOUD_API_KEY_REALM_AND_TYPE = def(9_099_0_00);
303304
public static final TransportVersion STATE_PARAM_GET_SNAPSHOT = def(9_100_0_00);
304305
public static final TransportVersion PROJECT_ID_IN_SNAPSHOTS_DELETIONS_AND_REPO_CLEANUP = def(9_101_0_00);
306+
public static final TransportVersion ML_INFERENCE_CUSTOM_SERVICE_REMOVE_ERROR_PARSING = def(9_102_0_00);
305307

306308
/*
307309
* STOP! READ THIS FIRST! No, really,

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/RestEsqlTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ public void testNamedParamsForIdentifierAndIdentifierPatterns() throws IOExcepti
794794
error = re.getMessage();
795795
assertThat(error, containsString("ParsingException"));
796796
assertThat(error, containsString("line 1:23: mismatched input '?cmd' expecting {"));
797-
assertThat(error, containsString("'dissect', 'eval', 'grok', 'limit', 'sort'"));
797+
assertThat(error, containsString("'dissect', 'eval', 'grok', 'limit', 'sample', 'sort'"));
798798
}
799799
}
800800

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

Lines changed: 10 additions & 9 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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ processingCommand
5757
| joinCommand
5858
| changePointCommand
5959
| completionCommand
60+
| sampleCommand
6061
// in development
6162
| {this.isDevVersion()}? inlinestatsCommand
6263
| {this.isDevVersion()}? lookupCommand
6364
| {this.isDevVersion()}? insistCommand
6465
| {this.isDevVersion()}? forkCommand
6566
| {this.isDevVersion()}? rerankCommand
6667
| {this.isDevVersion()}? rrfCommand
67-
| {this.isDevVersion()}? sampleCommand
6868
;
6969

7070
whereCommand
@@ -258,6 +258,10 @@ enrichWithClause
258258
: (newName=qualifiedNamePattern ASSIGN)? enrichField=qualifiedNamePattern
259259
;
260260

261+
sampleCommand
262+
: SAMPLE probability=constant
263+
;
264+
261265
//
262266
// In development
263267
//
@@ -322,7 +326,3 @@ rerankCommand
322326
completionCommand
323327
: COMPLETION (targetField=qualifiedName ASSIGN)? prompt=primaryExpression WITH inferenceId=identifierOrParameter
324328
;
325-
326-
sampleCommand
327-
: DEV_SAMPLE probability=constant
328-
;

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

Lines changed: 10 additions & 9 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
@@ -15,13 +15,13 @@ EVAL : 'eval' -> pushMode(EXPRESSION_MODE);
1515
GROK : 'grok' -> pushMode(EXPRESSION_MODE);
1616
LIMIT : 'limit' -> pushMode(EXPRESSION_MODE);
1717
ROW : 'row' -> pushMode(EXPRESSION_MODE);
18+
SAMPLE : 'sample' -> pushMode(EXPRESSION_MODE);
1819
SORT : 'sort' -> pushMode(EXPRESSION_MODE);
1920
STATS : 'stats' -> pushMode(EXPRESSION_MODE);
2021
WHERE : 'where' -> pushMode(EXPRESSION_MODE);
2122

2223
DEV_INLINESTATS : {this.isDevVersion()}? 'inlinestats' -> pushMode(EXPRESSION_MODE);
2324
DEV_RERANK : {this.isDevVersion()}? 'rerank' -> pushMode(EXPRESSION_MODE);
24-
DEV_SAMPLE : {this.isDevVersion()}? 'sample' -> pushMode(EXPRESSION_MODE);
2525

2626

2727
mode EXPRESSION_MODE;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ public enum Cap {
10821082
/**
10831083
* Support for the SAMPLE command
10841084
*/
1085-
SAMPLE_V3(Build.current().isSnapshot()),
1085+
SAMPLE_V3,
10861086

10871087
/**
10881088
* The {@code _query} API now gives a cast recommendation if multiple types are found in certain instances.
@@ -1207,7 +1207,7 @@ public enum Cap {
12071207
/**
12081208
* Support parameters for SAMPLE command.
12091209
*/
1210-
PARAMETER_FOR_SAMPLE(Build.current().isSnapshot()),
1210+
PARAMETER_FOR_SAMPLE,
12111211

12121212
/**
12131213
* From now, Literal only accepts strings as BytesRefs.

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)