ES|QL: fix validation in generative tests#142638
Merged
luigidellaquila merged 2 commits intoelastic:mainfrom Feb 18, 2026
Merged
ES|QL: fix validation in generative tests#142638luigidellaquila merged 2 commits intoelastic:mainfrom
luigidellaquila merged 2 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
ivancea
approved these changes
Feb 18, 2026
Comment on lines
+123
to
+131
| static ValidationResult expectSameColumns( | ||
| List<CommandDescription> previousCommands, | ||
| List<Column> previousColumns, | ||
| List<Column> columns | ||
| ) { | ||
|
|
||
| if (FunctionGenerator.isUnmappedFieldsEnabled(previousCommands)) { | ||
| return VALIDATION_OK; | ||
| } |
Contributor
There was a problem hiding this comment.
LGTM as a temporary fix, but the method now doesn't do what it says it will, and it doesn't feel good.
In theory, unmapped fields should be detected in the expectation an increase the expected column count (I think it's possible?).
But I think it's fine to have it as a continuation or an issue. Specially with unmapped field being very new
astefan
added a commit
to astefan/elasticsearch
that referenced
this pull request
Feb 18, 2026
astefan
added a commit
that referenced
this pull request
Feb 19, 2026
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Feb 19, 2026
…on-sliced-reindex * upstream/main: (120 commits) [Fleet] Add OpAMP field mappings to fleet-agents (elastic#142550) Clarify `expectedSize` behaviour of `ReleasableBytesStreamOutput` (elastic#142451) Refactor KnnIndexTester to tidy up some options (elastic#142651) Fixed with elastic#142638 already (elastic#142655) Change *OverTimeTests to extend AbstractAggregationTestCase (elastic#142659) Fix byteRefBlockHashSize for release mode (elastic#142668) Mute org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests testTransform {class org.elasticsearch.xpack.esql.plan.logical.MMR} elastic#142674 Fix PAUSED_FOR_NODE_REMOVAL shard blocking QUEUED promotion (elastic#142637) Mute org.elasticsearch.xpack.logsdb.RandomizedRollingUpgradeIT testIndexingStandardSource elastic#142670 Revert "[ESQL] Introduce pluggable external datasource framework (elastic#141678) (elastic#142663) Mute org.elasticsearch.xpack.esql.spatial.SpatialPushDownGeoShapeIT testQuantizedXY elastic#141234 PromQL: infer start/end from query DSL filters (elastic#142580) Add GPU vector indexing monitoring to _xpack/usage (elastic#141932) Fix testTrackerClearShutdown: use non-zero startTimeMillis for DONE status (elastic#142646) Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#142426 ESQL_ Move time_zone to GA (elastic#142287) Mute org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT test elastic#142426 DOCS: Convert Painless diagrams to mermaid (elastic#141851) ES|QL: fix validation in generative tests (elastic#142638) Unmute tests that do not reproduce failures (elastic#141712) ...
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.
This fixes a regression on output validation.
The fix is in
GenerativeRestTest: we didn't properly accumulate previous commands, and we passed an empty list tocheckResults.I also had to relax the check on
expectSameColumns(), to take into consideration that some commands that are not supposed to create new columns, now can actually do it.An example is WHERE command: if I use an unmapped field, it will appear as a new column.
We can iterate on this and add stricter validation in these cases.
Generative tests are muted for other reasons. I unmuted them locally and I ran the tests a few hundreds of times.
I didn't see any errors related to validation.
I got some random errors due to function generation though (eg. invalid parameter types), so I left the test muted for now. We'll need to iterate also on this.