Skip to content

Commit f4a3e2b

Browse files
nik9000matthewabbott
authored andcommitted
ESQL: Entirely remove META FUNCTIONS (elastic#113967)
This removes the undocumented `META FUNCTIONS` command that emits descriptions for all functions. This shouldn't be used because we never told anyone about it. I'd have preferred if we'd have explicitly documented it as no public or if we'd have left it snapshot-only. But sometimes you make a mistake. I'm hopeful no one is relying on it. It was never reliable and not public.....
1 parent ded7e8c commit f4a3e2b

File tree

29 files changed

+2038
-3051
lines changed

29 files changed

+2038
-3051
lines changed

build-tools-internal/src/main/resources/changelog-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@
284284
"Cluster and node setting",
285285
"Command line tool",
286286
"CRUD",
287+
"ES|QL",
287288
"Index setting",
288289
"Ingest",
289290
"JVM option",

docs/changelog/113967.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pr: 113967
2+
summary: "ESQL: Entirely remove META FUNCTIONS"
3+
area: ES|QL
4+
type: breaking
5+
issues: []
6+
breaking:
7+
title: "ESQL: Entirely remove META FUNCTIONS"
8+
area: ES|QL
9+
details: |
10+
Removes an undocumented syntax from ESQL: META FUNCTION. This was never
11+
reliable or really useful. Consult the documentation instead.
12+
impact: "Removes an undocumented syntax from ESQL: META FUNCTION"
13+
notable: false

docs/reference/rest-api/usage.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ GET /_xpack/usage
239239
"keep" : 0,
240240
"enrich" : 0,
241241
"from" : 0,
242-
"row" : 0,
243-
"meta" : 0
242+
"row" : 0
244243
},
245244
"queries" : {
246245
"rest" : {

x-pack/plugin/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,6 @@ tasks.named("yamlRestCompatTestTransform").configure({ task ->
8484
task.skipTest("security/10_forbidden/Test bulk response with invalid credentials", "warning does not exist for compatibility")
8585
task.skipTest("wildcard/30_ignore_above_synthetic_source/wildcard field type ignore_above", "Temporary until backported")
8686
task.skipTest("inference/inference_crud/Test get all", "Assertions on number of inference models break due to default configs")
87+
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry)", "The telemetry output changed. We dropped a column. That's safe.")
8788
})
8889

x-pack/plugin/esql/qa/server/mixed-cluster/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/mixed/MixedClusterEsqlSpecIT.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ public MixedClusterEsqlSpecIT(
7272
protected void shouldSkipTest(String testName) throws IOException {
7373
super.shouldSkipTest(testName);
7474
assumeTrue("Test " + testName + " is skipped on " + bwcVersion, isEnabled(testName, instructions, bwcVersion));
75-
assumeFalse(
76-
"Skip META tests on mixed version clusters because we change it too quickly",
77-
testCase.requiredCapabilities.contains("meta")
78-
);
7975
if (mode == ASYNC) {
8076
assumeTrue("Async is not supported on " + bwcVersion, supportsAsync());
8177
}

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClusterSpecIT.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ protected void shouldSkipTest(String testName) throws IOException {
112112
);
113113
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains("inlinestats"));
114114
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains("inlinestats_v2"));
115-
assumeFalse(
116-
"Skip META tests on mixed version clusters because we change it too quickly",
117-
testCase.requiredCapabilities.contains("meta")
118-
);
119115
}
120116

121117
private TestFeatureService remoteFeaturesService() throws IOException {

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

Lines changed: 0 additions & 552 deletions
This file was deleted.

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionIT.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.elasticsearch.xpack.core.esql.action.ColumnInfo;
3535
import org.elasticsearch.xpack.esql.VerificationException;
3636
import org.elasticsearch.xpack.esql.core.type.DataType;
37-
import org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry;
3837
import org.elasticsearch.xpack.esql.parser.ParsingException;
3938
import org.elasticsearch.xpack.esql.plugin.EsqlPlugin;
4039
import org.junit.Before;
@@ -1038,29 +1037,6 @@ public void testShowInfo() {
10381037
}
10391038
}
10401039

1041-
public void testMetaFunctions() {
1042-
try (EsqlQueryResponse results = run("meta functions")) {
1043-
assertThat(
1044-
results.columns(),
1045-
equalTo(
1046-
List.of(
1047-
new ColumnInfoImpl("name", "keyword"),
1048-
new ColumnInfoImpl("synopsis", "keyword"),
1049-
new ColumnInfoImpl("argNames", "keyword"),
1050-
new ColumnInfoImpl("argTypes", "keyword"),
1051-
new ColumnInfoImpl("argDescriptions", "keyword"),
1052-
new ColumnInfoImpl("returnType", "keyword"),
1053-
new ColumnInfoImpl("description", "keyword"),
1054-
new ColumnInfoImpl("optionalArgs", "boolean"),
1055-
new ColumnInfoImpl("variadic", "boolean"),
1056-
new ColumnInfoImpl("isAggregation", "boolean")
1057-
)
1058-
)
1059-
);
1060-
assertThat(getValuesList(results).size(), equalTo(new EsqlFunctionRegistry().listFunctions().size()));
1061-
}
1062-
}
1063-
10641040
public void testInWithNullValue() {
10651041
try (EsqlQueryResponse results = run("from test | where null in (data, 2) | keep data")) {
10661042
assertThat(results.columns(), equalTo(List.of(new ColumnInfoImpl("data", "long"))));

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ FROM : 'from' -> pushMode(FROM_MODE);
6666
GROK : 'grok' -> pushMode(EXPRESSION_MODE);
6767
KEEP : 'keep' -> pushMode(PROJECT_MODE);
6868
LIMIT : 'limit' -> pushMode(EXPRESSION_MODE);
69-
META : 'meta' -> pushMode(META_MODE);
7069
MV_EXPAND : 'mv_expand' -> pushMode(MVEXPAND_MODE);
7170
RENAME : 'rename' -> pushMode(RENAME_MODE);
7271
ROW : 'row' -> pushMode(EXPRESSION_MODE);
@@ -467,26 +466,6 @@ SHOW_WS
467466
: WS -> channel(HIDDEN)
468467
;
469468

470-
//
471-
// META commands
472-
//
473-
mode META_MODE;
474-
META_PIPE : PIPE -> type(PIPE), popMode;
475-
476-
FUNCTIONS : 'functions';
477-
478-
META_LINE_COMMENT
479-
: LINE_COMMENT -> channel(HIDDEN)
480-
;
481-
482-
META_MULTILINE_COMMENT
483-
: MULTILINE_COMMENT -> channel(HIDDEN)
484-
;
485-
486-
META_WS
487-
: WS -> channel(HIDDEN)
488-
;
489-
490469
mode SETTING_MODE;
491470
SETTING_CLOSING_BRACKET : CLOSING_BRACKET -> type(CLOSING_BRACKET), popMode;
492471

0 commit comments

Comments
 (0)