Skip to content

Commit 0b06d9f

Browse files
ES|QL: fix generative tests (elastic#131071)
excluding dense vector fields for now, since they are not supported by most commands
1 parent a7eb18e commit 0b06d9f

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,12 +543,6 @@ tests:
543543
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
544544
method: testStopQueryLocal
545545
issue: https://github.com/elastic/elasticsearch/issues/121672
546-
- class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT
547-
method: test
548-
issue: https://github.com/elastic/elasticsearch/issues/130067
549-
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
550-
method: test
551-
issue: https://github.com/elastic/elasticsearch/issues/130067
552546
- class: org.elasticsearch.xpack.esql.action.EsqlRemoteErrorWrapIT
553547
method: testThatRemoteErrorsAreWrapped
554548
issue: https://github.com/elastic/elasticsearch/issues/130794

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ public static List<CsvTestsDataLoader.EnrichConfig> policiesOnKeyword(List<CsvTe
107107
return policies.stream().filter(x -> Set.of("languages_policy").contains(x.policyName())).toList();
108108
}
109109

110-
public static String randomNonVector(List<Column> previousOutput) {
111-
return randomName(previousOutput.stream().filter(x -> x.type().contains("vector") == false).toList());
112-
}
113-
114110
public static String randomName(List<Column> previousOutput) {
115111
String result = randomRawName(previousOutput);
116112
if (result == null) {
@@ -292,7 +288,9 @@ public static boolean fieldCanBeUsed(Column field) {
292288
// https://github.com/elastic/elasticsearch/issues/121741
293289
field.name().equals("<all-fields-projected>")
294290
// this is a known pathological case, no need to test it for now
295-
|| field.name().equals("<no-fields>")) == false;
291+
|| field.name().equals("<no-fields>")
292+
// no dense vectors for now, they are not supported in most commands
293+
|| field.type().contains("vector")) == false;
296294
}
297295

298296
public static String unquote(String colName) {

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/command/pipe/MvExpandGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public CommandDescription generate(
2525
List<EsqlQueryGenerator.Column> previousOutput,
2626
QuerySchema schema
2727
) {
28-
String toExpand = EsqlQueryGenerator.randomNonVector(previousOutput);
28+
String toExpand = EsqlQueryGenerator.randomName(previousOutput);
2929
if (toExpand == null) {
3030
return EMPTY_DESCRIPTION; // no columns to expand
3131
}

0 commit comments

Comments
 (0)