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

QL: Improve removal of items during iteration #71193

Merged
merged 1 commit into from
Apr 3, 2021

Conversation

costin
Copy link
Member

@costin costin commented Apr 1, 2021

Clean-up the range optimization rule by avoid the use of indices during
iteration and removal (since it skips an element each time)
Remove redundant ternary calls

Clean-up the range optimization rule by avoid the use of indices during
iteration and removal (since it skips an element each time)
Remove redundant ternary calls
@costin costin requested review from astefan, bpintea and matriv April 1, 2021 16:31
@elasticmachine elasticmachine added the Team:QL (Deprecated) Meta label for query languages team label Apr 1, 2021
@elasticmachine
Copy link
Collaborator

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

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.

Good find.
I guess the tests cover the first change set, not sure if it's worth adding a new one to reveal the fixed defect -- up to you.
LGTM.

@costin
Copy link
Member Author

costin commented Apr 3, 2021

I think the issue did not occur in practice since the rule skipped one element but on a subsequent run, it picked it up and applied the compression again.
However with this fix, there's no need for a second run.

@costin costin merged commit 168dbc4 into elastic:master Apr 3, 2021
@costin costin deleted the ql/range-adjustment-cleanup branch April 3, 2021 15:48
costin added a commit to costin/elasticsearch that referenced this pull request Apr 3, 2021
Clean-up the range optimization rule by avoid the use of indices during
iteration and removal (since it skips an element each time)
Remove redundant ternary calls
costin added a commit to costin/elasticsearch that referenced this pull request Apr 3, 2021
Clean-up the range optimization rule by avoid the use of indices during
iteration and removal (since it skips an element each time)
Remove redundant ternary calls
costin added a commit that referenced this pull request Apr 3, 2021
Clean-up the range optimization rule by avoid the use of indices during
iteration and removal (since it skips an element each time)
Remove redundant ternary calls
costin added a commit that referenced this pull request Apr 3, 2021
Clean-up the range optimization rule by avoid the use of indices during
iteration and removal (since it skips an element each time)
Remove redundant ternary calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants