Skip to content

ESQL: Don't push down filters on the right hand side of an inlinejoin #127383

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Apr 25, 2025

Pushing down filters on the left hand side of an inlinestats commands could apparently be beneficial, but the source of the right hand side of the said inlinestats is the same as the left hand side one and this will inherently use the same filters, which is wrong.

For ex, FROM employees | INLINESTATS max_salary = MAX(salary) by languages | KEEP emp_no, languages, max_salary | WHERE emp_no == 10003 would consider emp_no == 10003 as eligible to be used like WHERE emp_no == 10003 | STATS MAX(salary) by languages which changes drastically the outcome of the stats command.

@elasticsearchmachine
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment