Skip to content

Conversation

costin
Copy link
Member

@costin costin commented Feb 25, 2025

Fixes the iteration to calling a full tree navigation per node (forEach already performs a full tree traversal) so it's back to O(N) instead of O(N^3) (forEach, call forEach per node, which calls forEach per child).

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 25, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@luigidellaquila luigidellaquila left a comment

Choose a reason for hiding this comment

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

Good catch! LGTM

Copy link
Contributor

@bpintea bpintea left a comment

Choose a reason for hiding this comment

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

Nice.
IIUC, the last loop should only run on a leaf, so practically "just" ^2?
I guess the calling sites could now also use a list instead of a hash set to collect the indices.

@costin costin merged commit e4604a4 into elastic:main Feb 26, 2025
17 checks passed
@costin costin deleted the esql/simplify-iteration branch February 26, 2025 16:31
costin added a commit to costin/elasticsearch that referenced this pull request Feb 26, 2025
@costin
Copy link
Member Author

costin commented Feb 26, 2025

💚 All backports created successfully

Status Branch Result
8.x
9.0
8.18
8.17

Questions ?

Please refer to the Backport tool documentation

@costin costin removed the v8.17.3 label Feb 26, 2025
elasticsearchmachine pushed a commit that referenced this pull request Feb 26, 2025
costin added a commit that referenced this pull request Feb 26, 2025
elasticsearchmachine pushed a commit that referenced this pull request Feb 26, 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 >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.0 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants