Skip to content

ESQL: Fix nullify/load for STATS with WHERE#144029

Merged
alex-spies merged 12 commits intoelastic:mainfrom
alex-spies:fix-nullify-where-in-stats
Mar 12, 2026
Merged

ESQL: Fix nullify/load for STATS with WHERE#144029
alex-spies merged 12 commits intoelastic:mainfrom
alex-spies:fix-nullify-where-in-stats

Conversation

@alex-spies
Copy link
Copy Markdown
Contributor

@alex-spies alex-spies commented Mar 11, 2026

Fix #143991

Developed using AI-assisted tooling

@alex-spies alex-spies added >bug auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.4.0 v9.3.3 labels Mar 11, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 11, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @alex-spies, I've created a changelog YAML for you.

elasticsearchmachine and others added 2 commits March 11, 2026 14:43
Bwc tests otherwise fail as older nodes/clusters do not have the fix.
@alex-spies alex-spies enabled auto-merge (squash) March 12, 2026 09:18
@alex-spies alex-spies changed the title ESQL: Fix nullify where in stats ESQL: Fix nullify/load for STATS with WHERE Mar 12, 2026
@alex-spies alex-spies disabled auto-merge March 12, 2026 09:18
@alex-spies alex-spies enabled auto-merge (squash) March 12, 2026 09:20
@alex-spies alex-spies merged commit af52ceb into elastic:main Mar 12, 2026
36 checks passed
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

Status Branch Result
9.3 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 144029

@alex-spies alex-spies deleted the fix-nullify-where-in-stats branch March 12, 2026 12:04
@alex-spies
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.3

Questions ?

Please refer to the Backport tool documentation

alex-spies added a commit to alex-spies/elasticsearch that referenced this pull request Mar 13, 2026
Fix nullify/load for commands like `STATS VALUES(field) WHERE field IS NOT NULL` where a missing field leads to unresolved references twice for the same field name.

(cherry picked from commit af52ceb)

# Conflicts:
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/unmapped-load.csv-spec
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/rules/ResolveUnmapped.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerUnmappedTests.java
elasticsearchmachine pushed a commit that referenced this pull request Mar 13, 2026
* ESQL: Fix nullify/load for STATS with WHERE (#144029)

Fix nullify/load for commands like `STATS VALUES(field) WHERE field IS NOT NULL` where a missing field leads to unresolved references twice for the same field name.

(cherry picked from commit af52ceb)

# Conflicts:
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/unmapped-load.csv-spec
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/rules/ResolveUnmapped.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerUnmappedTests.java

* Fix import

* Update required capabilities

* Fix test
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
Fix nullify/load for commands like `STATS VALUES(field) WHERE field IS NOT NULL` where a missing field leads to unresolved references twice for the same field name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.3.3 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESQL: nullify not working in STATS with WHERE edge case

3 participants