Skip to content

Conversation

@idegtiarenko
Copy link
Contributor

When validating ParsingException(s) the testing framework displays query only if exception is not thrown at all and not when the error message is different from the expected one.

This change adds the query to both cases.
It makes it much easier to troubleshot failures from tests that rely on a query generation and/or IdentifierGenerator.

@idegtiarenko idegtiarenko added >test Issues or PRs that are addressing/adding tests Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.1.0 labels Mar 25, 2025
@idegtiarenko idegtiarenko requested a review from alex-spies March 25, 2025 09:22
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Ievgen!

return new MapExpression(EMPTY, ees);
}

void expectError(String query, String errorMessage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could just defer to expectError(String query, List<QueryParam> params, String errorMessage) with params given by new QueryParams().

@idegtiarenko idegtiarenko merged commit 11fed45 into elastic:main Mar 25, 2025
17 checks passed
@idegtiarenko idegtiarenko deleted the parser_test_error_description branch March 25, 2025 13:23
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
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.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants