Skip to content

ES|QL: fix validation in generative tests#142638

Merged
luigidellaquila merged 2 commits intoelastic:mainfrom
luigidellaquila:esql/fix_generative_validation
Feb 18, 2026
Merged

ES|QL: fix validation in generative tests#142638
luigidellaquila merged 2 commits intoelastic:mainfrom
luigidellaquila:esql/fix_generative_validation

Conversation

@luigidellaquila
Copy link
Copy Markdown
Contributor

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 to checkResults.

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.

@luigidellaquila luigidellaquila added >test Issues or PRs that are addressing/adding tests :Analytics/ES|QL AKA ESQL labels Feb 18, 2026
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0 labels Feb 18, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Copy link
Copy Markdown
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luigidellaquila luigidellaquila enabled auto-merge (squash) February 18, 2026 10:17
Copy link
Copy Markdown
Contributor

@ivancea ivancea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

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;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@luigidellaquila luigidellaquila merged commit bddcd26 into elastic:main Feb 18, 2026
35 checks passed
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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants