Skip to content

Commit a0dce5c

Browse files
[ES|QL] Take double parameter markers for identifiers out of snapshot (#125690)
* take double parameter markers out of snapshot
1 parent d12a662 commit a0dce5c

File tree

17 files changed

+1662
-1762
lines changed

17 files changed

+1662
-1762
lines changed

docs/changelog/125690.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125690
2+
summary: Take double parameter markers for identifiers out of snapshot
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -808,10 +808,7 @@ public void testErrorMessageForMissingParams() throws IOException {
808808
}
809809

810810
public void testDoubleParamsForIdentifiers() throws IOException {
811-
assumeTrue(
812-
"double parameters markers for identifiers requires snapshot build",
813-
EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled()
814-
);
811+
assumeTrue("double parameters markers for identifiers", EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled());
815812
bulkLoadTestData(10);
816813
// positive
817814
// named double parameters
@@ -953,10 +950,7 @@ public void testDoubleParamsForIdentifiers() throws IOException {
953950
}
954951

955952
public void testDoubleParamsWithLookupJoin() throws IOException {
956-
assumeTrue(
957-
"double parameters markers for identifiers requires snapshot build",
958-
EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled()
959-
);
953+
assumeTrue("double parameters markers for identifiers", EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled());
960954
bulkLoadTestDataLookupMode(10);
961955
var query = requestObjectBuilder().query(
962956
format(

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

Lines changed: 1 addition & 0 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
@@ -156,7 +156,7 @@ identifier
156156
identifierPattern
157157
: ID_PATTERN
158158
| parameter
159-
| {this.isDevVersion()}? doubleParameter
159+
| doubleParameter
160160
;
161161

162162
parameter
@@ -172,7 +172,7 @@ doubleParameter
172172
identifierOrParameter
173173
: identifier
174174
| parameter
175-
| {this.isDevVersion()}? doubleParameter
175+
| doubleParameter
176176
;
177177

178178
limitCommand

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

Lines changed: 1 addition & 0 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/Enrich.g4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ ENRICH_FIELD_QUOTED_IDENTIFIER
6565
6666
ENRICH_FIELD_PARAM : PARAM -> type(PARAM);
6767
ENRICH_FIELD_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
68-
ENRICH_FIELD_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
69-
ENRICH_FIELD_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
68+
ENRICH_FIELD_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
69+
ENRICH_FIELD_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
7070
7171
ENRICH_FIELD_LINE_COMMENT
7272
: LINE_COMMENT -> channel(HIDDEN)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ PERCENT : '%';
123123
LEFT_BRACES : '{';
124124
RIGHT_BRACES : '}';
125125

126-
DOUBLE_PARAMS: {this.isDevVersion()}? '??';
126+
DOUBLE_PARAMS: '??';
127127

128128
NESTED_WHERE : WHERE -> type(WHERE);
129129

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ MVEXPAND_PIPE : PIPE -> type(PIPE), popMode;
1717
MVEXPAND_DOT: DOT -> type(DOT);
1818
MVEXPAND_PARAM : PARAM -> type(PARAM);
1919
MVEXPAND_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
20-
MVEXPAND_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
21-
MVEXPAND_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
20+
MVEXPAND_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
21+
MVEXPAND_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
2222

2323
MVEXPAND_QUOTED_IDENTIFIER
2424
: QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ PROJECT_DOT: DOT -> type(DOT);
1919
PROJECT_COMMA : COMMA -> type(COMMA);
2020
PROJECT_PARAM : PARAM -> type(PARAM);
2121
PROJECT_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
22-
PROJECT_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
23-
PROJECT_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
22+
PROJECT_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
23+
PROJECT_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
2424

2525
fragment UNQUOTED_ID_BODY_WITH_PATTERN
2626
: (LETTER | DIGIT | UNDERSCORE | ASTERISK)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ RENAME_COMMA : COMMA -> type(COMMA);
1919
RENAME_DOT: DOT -> type(DOT);
2020
RENAME_PARAM : PARAM -> type(PARAM);
2121
RENAME_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
22-
RENAME_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
23-
RENAME_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
22+
RENAME_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
23+
RENAME_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
2424

2525
AS : 'as';
2626

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
@@ -907,7 +907,7 @@ public enum Cap {
907907
/**
908908
* Use double parameter markers to represent field or function names.
909909
*/
910-
DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS(Build.current().isSnapshot()),
910+
DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS,
911911

912912
/**
913913
* Non full text functions do not contribute to score

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

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

0 commit comments

Comments
 (0)