Skip to content

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Jul 30, 2025

Fixes #118621

@elasticsearchmachine
Copy link
Collaborator

Hi @astefan, I've created a changelog YAML for you.

api 'io.ous:jtoml:2.0.0'
}

tasks.register("loadTestData", JavaExec) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for testing purposes, has nothing to do with the actual fix.

return map;
}

public static void main(String[] args) throws IOException {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes in this class are just for testing purposes, has nothing to do with the actual fix.

return super.resolveType();
}

public TypeResolution validateInTypes() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added this one because I didn't want to change the resolveType method and to be able to call it from the optimizer rule.

// double check the validity of an internally created IN (like the one created here). EQL is one where the IN
// implementation is like this mechanism here has been specifically created for it
if (shouldValidateIn()) {
Expression.TypeResolution resolution = in.validateInTypes();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The meat of the fix.

In in = (In) e;
assertEquals(fa, in.value());
assertThat(in.list(), contains(ONE, TWO));
assertCombineDisjunctionsToIn((rule) -> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Existent test methods are now tested on both types of In (with and without validation) to prove the validation existence doesn't change anything in the existent logic.

@astefan astefan requested review from bpintea and costin July 31, 2025 20:58
@astefan astefan marked this pull request as ready for review July 31, 2025 20:58
@astefan astefan added the auto-backport Automatically create backport pull requests when merged label Jul 31, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jul 31, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

LGTM. Kudos for the nice, surgical approach.

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.1
8.19
9.0
8.18
astefan added a commit to astefan/elasticsearch that referenced this pull request Aug 4, 2025
astefan added a commit to astefan/elasticsearch that referenced this pull request Aug 4, 2025
astefan added a commit to astefan/elasticsearch that referenced this pull request Aug 4, 2025
szybia added a commit to szybia/elasticsearch that referenced this pull request Aug 5, 2025
…cking * upstream/main: (26 commits) [Fleet] add privileges to `kibana_system` to read integrations data (elastic#132400) Add `TestEntitlementsRule` with support for dynamic entitled node paths for testing (elastic#132077) Reduce logging frequency for GCS per project clients (elastic#132429) Skip update/100_synthetic_source tests in yamlRestCompatTests (elastic#132296) Correct exception for missing nested path (elastic#132408) Fixing esql release tests elastic#132369 (elastic#132406) Adjust date docvalue formatting to return 4xx instead of 5xx (elastic#132414) Handle nested fields with the termvectors REST API in artificial docs (elastic#92568) Only collect bulk scored vectors when exceeding min competitive (elastic#132293) Fix release tests diskbbq update (elastic#132405) ESQL: Fix skipping of generative tests (elastic#132390) Short circuit failure handling in OIDC flow (elastic#130618) Small optimization in OptimizedScalarQuantizer by using mul instead of div (elastic#132397) Aggs: Add validation to Bucket script pipeline agg (elastic#132320) ESQL: Multiple parameters in ungrouped aggs (elastic#132375) ESQL: Explain test operators (elastic#132374) EQL: Deal with internally created IN in a different way for EQL (elastic#132167) Speed up hierarchical k-means by computing distances in bulk (elastic#132384) Reduce the number of fields per document (elastic#132322) Assert current thread in ESQL (elastic#132324) ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/EQL EQL querying auto-backport Automatically create backport pull requests when merged >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.5 v8.19.1 v9.0.5 v9.1.1 v9.2.0

3 participants