ESQL: Finish migrating error testing#143322
Merged
nik9000 merged 3 commits intoelastic:mainfrom Mar 2, 2026
Merged
Conversation
A long time ago (elastic#119678) we started migrating type error testing from many test cases to a single test. This was supposed to allow us to significantly simplify our testing infrastructure. But we never finished it. Well, I've finally done it! This: * Replaces `errorsForCasesWithoutExamples` and subclasses of `ErrorsForCasesWithoutExamplesTestCase` * Replaces `TestCaseSupplier.TestCase.typeError` in `TopTests` with a new `TopErrorTests`
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
nik9000
commented
Feb 28, 2026
| .and(isType(limitField(), dt -> dt == DataType.INTEGER, sourceText(), SECOND, "integer")) | ||
| .and(isNotNull(orderField(), sourceText(), THIRD)) | ||
| .and(isString(orderField(), sourceText(), THIRD)); | ||
| .and(isType(orderField(), dt -> dt == DataType.KEYWORD, sourceText(), THIRD, "keyword")); |
Member
Author
There was a problem hiding this comment.
This wants a constant string and those are always keyword.
ivancea
approved these changes
Mar 2, 2026
| null | ||
| ); | ||
| assertTrue(top.typeResolved().unresolved()); | ||
| assertThat(top.typeResolved().message(), equalTo("Limit must be greater than 0 in [], found [0]")); |
Contributor
There was a problem hiding this comment.
Thanks! 🙏
Those should have been PostAnalysisVerificationAware afaik. We should migrate them eventually
| * For two args, this assumes they are both spatial. | ||
| * For three args, we assume two spatial and one additional numerical argument, treated differently. | ||
| */ | ||
| protected static String typeErrorMessage( |
Contributor
There was a problem hiding this comment.
At some point, I start wondering if this is less code than just hardcoding every combination... Just a thought, feel free to ignore it
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Mar 2, 2026
…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)
...
tballison
pushed a commit
to tballison/elasticsearch
that referenced
this pull request
Mar 3, 2026
A long time ago (elastic#119678) we started migrating type error testing from many test cases to a single test. This was supposed to allow us to significantly simplify our testing infrastructure. But we never finished it. Well, I've finally done it! This: * Replaces `errorsForCasesWithoutExamples` and subclasses of `ErrorsForCasesWithoutExamplesTestCase` * Replaces `TestCaseSupplier.TestCase.typeError` in `TopTests` with a new `TopErrorTests`
This was referenced Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A long time ago (#119678) we started migrating type error testing from many test cases to a single test. This was supposed to allow us to significantly simplify our testing infrastructure. But we never finished it. Well, I've finally done it!
This:
errorsForCasesWithoutExamplesand subclasses ofErrorsForCasesWithoutExamplesTestCaseTestCaseSupplier.TestCase.typeErrorinTopTestswith a newTopErrorTests