-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Allow using the same index in FROM and LOOKUP #118768
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec: Language not supported
Comments suppressed due to low confidence (2)
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/PlannerUtils.java:114
- Ensure that the children() method is correctly defined and used elsewhere in the codebase to avoid potential issues with the new forEachUp method.
}, node -> node instanceof LookupJoinExec join ? List.of(join.left()) : node.children());
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/Node.java:91
- Potential NullPointerException if childrenGetter.apply((T) this) returns null. Consider adding a null check.
childrenGetter.apply((T) this).forEach(c -> c.forEachUp(action, childrenGetter));
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java
Show resolved
Hide resolved
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/Node.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes here are just reverting to the original logic
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
craigtaverner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, This is certainly a simpler solution than what I originally coded, so I'm not surprised you reverted that. I think it's likely we will want to get the lookup indexes back into the ComputeService later when we support SearchStats for lookups, but for now this simpler code seems like the best approach.
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/Node.java
Outdated
Show resolved
Hide resolved
# Conflicts: # x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec
💚 Backport successful
|
Changed the logic so that, instead of getting all the indices of the plan and then subtracting the lookup ones, it will now directly ignore the lookup part in the initial calculation.
Changed the logic so that, instead of getting all the indices of the plan and then subtracting the lookup ones, it will now directly ignore the lookup part in the initial calculation.
Changed the logic so that, instead of getting all the indices of the plan and then subtracting the lookup ones, it will now directly ignore the lookup part in the initial calculation.