ESQL: Generative testing with full text functions#142961
ESQL: Generative testing with full text functions#142961astefan merged 18 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
...src/main/java/org/elasticsearch/xpack/esql/generator/function/FullTextFunctionGenerator.java
Show resolved
Hide resolved
...src/main/java/org/elasticsearch/xpack/esql/generator/function/FullTextFunctionGenerator.java
Show resolved
Hide resolved
luigidellaquila
left a comment
There was a problem hiding this comment.
Thanks @astefan, overall it looks pretty good.
I left a first round of comments.
| String errorMessage, | ||
| String query, | ||
| List<CommandGenerator.CommandDescription> commandsForFieldOriginTracing, | ||
| List<CommandGenerator.CommandDescription> commandsForPlacementChecks |
There was a problem hiding this comment.
commandsForPlacementChecks is not used, is it?
| private record FailureContext( | ||
| String errorMessage, | ||
| String query, | ||
| List<CommandGenerator.CommandDescription> commandsForFieldOriginTracing, |
There was a problem hiding this comment.
I wonder if it makes sense to just call it previousCommands. Maybe they will be useful also for other purposes, apart from origin tracing
| ) { | ||
| List<CommandGenerator.CommandDescription> commands = new ArrayList<>(previousCommands.size() + 1); | ||
| commands.addAll(previousCommands); | ||
| commands.add(commandDescription); |
There was a problem hiding this comment.
Maybe I'm overlooking something, but I think we don't need this.
...server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java
Show resolved
Hide resolved
...src/main/java/org/elasticsearch/xpack/esql/generator/function/FullTextFunctionGenerator.java
Show resolved
Hide resolved
.../qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/generator/FunctionGenerator.java
Show resolved
Hide resolved
...server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java
Show resolved
Hide resolved
…generative_full-text-functions
...src/main/java/org/elasticsearch/xpack/esql/generator/function/FullTextFunctionGenerator.java
Show resolved
Hide resolved
…generative_full-text-functions
for unmapped_fields
…generative_full-text-functions
luigidellaquila
left a comment
There was a problem hiding this comment.
Thanks @astefan, the changes look correct and super useful IMHO, so LGTM.
The CI is still red, but I'm not sure the failure is related to these changes.
The failing query has a multi_match query in a FORK branch, maybe this is related. Or maybe FORK is just too expensive by itself for the small CI instance.
Anyway, the query looks correct, if there is a bug it's likely not in this PR.
|
@luigidellaquila unfortunately one of the failures is a true AssertionError that our own code (not the test infra in generative testing) throws. See #143121 |
|
I have opened #143249 to address the AssertionError encountered earlier. |
…generative_full-text-functions
…locations
* upstream/main: (94 commits)
Mute org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT test {p0=esql/40_tsdb/TS Command grouping on text field} elastic#142544
Mute org.elasticsearch.index.store.StoreDirectoryMetricsIT testDirectoryMetrics elastic#143419
Mute org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT test elastic#143023
TS_INFO information retrieval command (elastic#142721)
ESQL: External source parallel execution and distribution (elastic#143349)
Mute org.elasticsearch.index.mapper.blockloader.FlattenedFieldRootBlockLoaderTests testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=DOC_VALUES]} elastic#143414
Mute org.elasticsearch.index.mapper.blockloader.FlattenedFieldRootBlockLoaderTests testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=NONE]} elastic#143413
Mute org.elasticsearch.index.mapper.blockloader.FlattenedFieldRootBlockLoaderTests testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=STORED]} elastic#143412
Removing ingest random sampling (elastic#143289)
Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#143023
[Transform] Clean up internal tests (elastic#143246)
Skip time series field type merge for non-TS agg queries (elastic#143262)
Enable zero-copy SIMD vector scoring on searchable snapshots (frozen tier) (elastic#141718)
Mute org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips elastic#143407
Fix MemorySegmentUtilsTests (elastic#143391)
Unmute testWorkflowsRestrictionAllowsAccess (elastic#143308)
Cancel async query on expiry (elastic#143016)
ESQL: Finish migrating error testing (elastic#143322)
Reduce LuceneOperator.Status memory consumption with large QueryDSL queries (elastic#143175)
ESQL: Generative testing with full text functions (elastic#142961)
...
This adds support for generative testing for full-text search functions. They are tricky because they have many restrictions. Many of them are already caught and handled in this PR's code.
I've also refactored the functions generation code since the FunctionGenerator became harder to grasp.
Co-authored with AI-tools help.