Skip to content

ESQL: Fix constant keyword optimization (#129278) #129354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 16, 2025

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Jun 12, 2025

Fixes the ESQL's detection of constant_keyword fields. We unplugged it when we changed a function signature because we didn't have an @Override annotation. This plugs it back in and adds it to the integration tests we use for pushing queries to lucene. When you do | WHERE constant_keyword_field == "itsvalue" then the whole is removed from the query plan because all documents are equal.

Fixes the ESQL's detection of `constant_keyword` fields. We unplugged it
when we changed a function signature because we didn't have an
`@Override` annotation. This plugs it back in and adds it to the
integration tests we use for pushing queries to lucene. When you do
`| WHERE constant_keyword_field == "itsvalue"` then the whole is removed
from the query plan because *all* documents are equal.
@nik9000 nik9000 added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Jun 12, 2025
@elasticsearchmachine elasticsearchmachine merged commit bdd93c9 into elastic:8.19 Jun 16, 2025
22 checks passed
@nik9000 nik9000 deleted the esql_fix_equals_8_19 branch June 16, 2025 15:54
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-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants