Skip to content

Commit c6dd888

Browse files
ES|QL: Fix generative tests
1 parent 05fc6f2 commit c6dd888

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,18 +539,12 @@ tests:
539539
- class: org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT
540540
method: test {yaml=indices.resolve_index/10_basic_resolve_index/Resolve index with hidden and closed indices}
541541
issue: https://github.com/elastic/elasticsearch/issues/130568
542-
- class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT
543-
method: test
544-
issue: https://github.com/elastic/elasticsearch/issues/130067
545542
- class: org.elasticsearch.xpack.monitoring.exporter.http.HttpExporterTests
546543
method: testExporterWithHostOnly
547544
issue: https://github.com/elastic/elasticsearch/issues/130599
548545
- class: org.elasticsearch.xpack.monitoring.exporter.http.HttpExporterTests
549546
method: testCreateRestClient
550547
issue: https://github.com/elastic/elasticsearch/issues/130600
551-
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
552-
method: test
553-
issue: https://github.com/elastic/elasticsearch/issues/130067
554548
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
555549
method: test {p0=search.vectors/40_knn_search/Dimensions are dynamically set}
556550
issue: https://github.com/elastic/elasticsearch/issues/130626

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ 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+
110114
public static String randomName(List<Column> previousOutput) {
111115
String result = randomRawName(previousOutput);
112116
if (result == null) {

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.randomName(previousOutput);
28+
String toExpand = EsqlQueryGenerator.randomNonVector(previousOutput);
2929
if (toExpand == null) {
3030
return EMPTY_DESCRIPTION; // no columns to expand
3131
}

0 commit comments

Comments
 (0)