Skip to content

Conversation

@luigidellaquila
Copy link
Contributor

Adding an integration test for queries where a LOOKUP JOIN is executed after a pipeline breaker

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.2.0 labels Sep 4, 2025
@luigidellaquila luigidellaquila added >test Issues or PRs that are addressing/adding tests :Analytics/ES|QL AKA ESQL labels Sep 4, 2025
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) and removed needs:triage Requires assignment of a team area label labels Sep 4, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Comment on lines 291 to 302
var ex = expectThrows(
VerificationException.class,
() -> runQuery(
"FROM c*:logs-* | EVAL lookup_key = v | STATS lookup_key = max(lookup_key) | LOOKUP JOIN values_lookup ON lookup_key",
randomBoolean()
)
);
assertThat(
ex.getMessage(),
containsString("LOOKUP JOIN with remote indices can't be executed after [STATS lookup_key = max(lookup_key)]")
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this could be simplified to:

Suggested change
var ex = expectThrows(
VerificationException.class,
() -> runQuery(
"FROM c*:logs-* | EVAL lookup_key = v | STATS lookup_key = max(lookup_key) | LOOKUP JOIN values_lookup ON lookup_key",
randomBoolean()
)
);
assertThat(
ex.getMessage(),
containsString("LOOKUP JOIN with remote indices can't be executed after [STATS lookup_key = max(lookup_key)]")
);
}
expectThrows(
VerificationException.class,
containsString("LOOKUP JOIN with remote indices can't be executed after [STATS lookup_key = max(lookup_key)]"),
() -> runQuery(
"FROM c*:logs-* | EVAL lookup_key = v | STATS lookup_key = max(lookup_key) | LOOKUP JOIN values_lookup ON lookup_key",
randomBoolean()
)
);
}

@luigidellaquila luigidellaquila merged commit 70af095 into elastic:main Sep 4, 2025
33 checks passed
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.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants