Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/125690.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 125690
summary: Take double parameter markers for identifiers out of snapshot
area: ES|QL
type: enhancement
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,7 @@ public void testErrorMessageForMissingParams() throws IOException {
}

public void testDoubleParamsForIdentifiers() throws IOException {
assumeTrue(
"double parameters markers for identifiers requires snapshot build",
EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled()
);
assumeTrue("double parameters markers for identifiers", EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled());
bulkLoadTestData(10);
// positive
// named double parameters
Expand Down Expand Up @@ -953,10 +950,7 @@ public void testDoubleParamsForIdentifiers() throws IOException {
}

public void testDoubleParamsWithLookupJoin() throws IOException {
assumeTrue(
"double parameters markers for identifiers requires snapshot build",
EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled()
);
assumeTrue("double parameters markers for identifiers", EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled());
bulkLoadTestDataLookupMode(10);
var query = requestObjectBuilder().query(
format(
Expand Down
18 changes: 9 additions & 9 deletions x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ PERCENT : '%';
LEFT_BRACES : '{';
RIGHT_BRACES : '}';

DOUBLE_PARAMS: {this.isDevVersion()}? '??';
DOUBLE_PARAMS: '??';

NESTED_WHERE : WHERE -> type(WHERE);

Expand Down Expand Up @@ -323,8 +323,8 @@ PROJECT_DOT: DOT -> type(DOT);
PROJECT_COMMA : COMMA -> type(COMMA);
PROJECT_PARAM : PARAM -> type(PARAM);
PROJECT_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
PROJECT_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
PROJECT_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
PROJECT_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
PROJECT_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);

fragment UNQUOTED_ID_BODY_WITH_PATTERN
: (LETTER | DIGIT | UNDERSCORE | ASTERISK)
Expand Down Expand Up @@ -360,8 +360,8 @@ RENAME_COMMA : COMMA -> type(COMMA);
RENAME_DOT: DOT -> type(DOT);
RENAME_PARAM : PARAM -> type(PARAM);
RENAME_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
RENAME_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
RENAME_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
RENAME_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
RENAME_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);

AS : 'as';

Expand Down Expand Up @@ -435,8 +435,8 @@ ENRICH_FIELD_QUOTED_IDENTIFIER

ENRICH_FIELD_PARAM : PARAM -> type(PARAM);
ENRICH_FIELD_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
ENRICH_FIELD_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
ENRICH_FIELD_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
ENRICH_FIELD_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
ENRICH_FIELD_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);

ENRICH_FIELD_LINE_COMMENT
: LINE_COMMENT -> channel(HIDDEN)
Expand All @@ -455,8 +455,8 @@ MVEXPAND_PIPE : PIPE -> type(PIPE), popMode;
MVEXPAND_DOT: DOT -> type(DOT);
MVEXPAND_PARAM : PARAM -> type(PARAM);
MVEXPAND_NAMED_OR_POSITIONAL_PARAM : NAMED_OR_POSITIONAL_PARAM -> type(NAMED_OR_POSITIONAL_PARAM);
MVEXPAND_DOUBLE_PARAMS : {this.isDevVersion()}? DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
MVEXPAND_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : {this.isDevVersion()}? NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);
MVEXPAND_DOUBLE_PARAMS : DOUBLE_PARAMS -> type(DOUBLE_PARAMS);
MVEXPAND_NAMED_OR_POSITIONAL_DOUBLE_PARAMS : NAMED_OR_POSITIONAL_DOUBLE_PARAMS -> type(NAMED_OR_POSITIONAL_DOUBLE_PARAMS);

MVEXPAND_QUOTED_IDENTIFIER
: QUOTED_IDENTIFIER -> type(QUOTED_IDENTIFIER)
Expand Down
1 change: 1 addition & 0 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.

4 changes: 2 additions & 2 deletions x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ identifier
identifierPattern
: ID_PATTERN
| parameter
| {this.isDevVersion()}? doubleParameter
| doubleParameter
;

constant
Expand Down Expand Up @@ -233,7 +233,7 @@ doubleParameter
identifierOrParameter
: identifier
| parameter
| {this.isDevVersion()}? doubleParameter
| doubleParameter
;

limitCommand
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.tokens

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

Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ public enum Cap {
/**
* Use double parameter markers to represent field or function names.
*/
DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS(Build.current().isSnapshot()),
DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS,

/**
* Non full text functions do not contribute to score
Expand Down

Large diffs are not rendered by default.

Loading