Skip to content

Conversation

@ivancea
Copy link
Contributor

@ivancea ivancea commented Dec 16, 2024

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.

@ivancea ivancea added >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.0.0 v8.18.0 labels Dec 16, 2024
@ivancea ivancea requested a review from Copilot December 16, 2024 13:33
Copy link
Contributor

Copilot AI left a 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));

Copy link
Contributor Author

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

@ivancea ivancea marked this pull request as ready for review December 16, 2024 13:53
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@craigtaverner craigtaverner left a 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.

# Conflicts:
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec
@ivancea ivancea requested a review from costin December 17, 2024 12:27
@ivancea ivancea enabled auto-merge (squash) December 17, 2024 17:08
@ivancea ivancea disabled auto-merge December 18, 2024 10:13
@ivancea ivancea merged commit c75e92a into elastic:main Dec 18, 2024
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

ivancea added a commit to ivancea/elasticsearch that referenced this pull request Dec 18, 2024
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.
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
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.
@ivancea ivancea deleted the lookup-join-repeated-index branch December 18, 2024 11:48
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Dec 18, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants