Skip to content
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

ESQL: continue resolving attributes for Eval #99601

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Sep 14, 2023

The code for attempting to resolve unresolved attributes was prematurely stopped when one attributes was deemed unresolvable disallowing chained evaluation expressions in the same eval command. This small change makes the attributes resolution continue until all expressions are visited.
Fixes #99576

@astefan astefan requested a review from costin September 14, 2023 22:03
@elasticsearchmachine elasticsearchmachine added the Team:QL (Deprecated) Meta label for query languages team label Sep 14, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)

Comment on lines 330 to 332
if (ua.customMessage()) {
return ua;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In essence, skip this part (quickly returning from resolving an Attribute) and let eval have another chance at resolving expressions that use attributes from previous eval expressions.

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.

Noice!

@astefan astefan merged commit f04af72 into elastic:main Sep 19, 2023
@astefan astefan deleted the 99576_fix branch September 19, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug Team:QL (Deprecated) Meta label for query languages team v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESQL: more than two EVAL expressions using previous new evaluations will fail
3 participants