You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/GenerativeMetricsIT.java
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java
"Plan \\[ProjectExec\\[\\[<no-fields>.* optimized incorrectly due to missing references",
60
66
"The incoming YAML document exceeds the limit:", // still to investigate, but it seems to be specific to the test framework
61
67
"Data too large", // Circuit breaker exceptions eg. https://github.com/elastic/elasticsearch/issues/130072
62
68
"optimized incorrectly due to missing references", // https://github.com/elastic/elasticsearch/issues/131509
@@ -69,7 +75,8 @@ public abstract class GenerativeRestTest extends ESRestTestCase {
69
75
"count_star .* can't be used with TS command",
70
76
"time_series aggregate.* can only be used with the TS command",
71
77
"Invalid call to dataType on an unresolved object \\?LASTOVERTIME", // https://github.com/elastic/elasticsearch/issues/134791
72
-
"class org.elasticsearch.compute.data..*Block cannot be cast to class org.elasticsearch.compute.data..*Block", // https://github.com/elastic/elasticsearch/issues/134793
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/README.asciidoc
+4-11Lines changed: 4 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,18 +26,11 @@ The result check happens at two levels:
26
26
27
27
== Implementing your own command generator
28
28
29
-
If you implement a new command, and you want it to be tested by the generative tests, you can add a command generator here.
29
+
If you create a new command, we strongly recommend you to implement a command generator for it, so that it is tested
* add a class in `org.elasticsearch.xpack.esql.qa.rest.generative.command.source` (if it's a source command) or in `org.elasticsearch.xpack.esql.qa.rest.generative.command.pipe` (if it's a pipe command)
34
-
* Implement `CommandGenerator` interface (see its javadoc, it should be explicative. Or just have a look at one of the existing commands, eg. `SortGenerator`)
35
-
** Implement `CommandGenerator.generate()` method, that will return the command.
36
-
*** Have a look at `EsqlQueryGenerator`, it contains many utility methods that will help you generate random expressions.
37
-
** Implement `CommandGenerator.validateOutput()` to validate the output of the query.
38
-
* Add your class to `EsqlQueryGenerator.SOURCE_COMMANDS` (if it's a source command) or `EsqlQueryGenerator.PIPE_COMMANDS` (if it's a pipe command).
39
-
* Run `GenerativeIT` at least a couple of times: these tests can be pretty noisy.
40
-
* If you get unexpected errors (real bugs in ES|QL), please open an issue and add the error to `GenerativeRestTest.ALLOWED_ERRORS`. Run tests again until everything works fine.
41
35
42
36
43
-
IMPORTANT: be careful when validating the output (Eg. the row count), as ES|QL can be quite non-deterministic when there are no SORTs
0 commit comments