-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Remove tech debt on Aggregations#getLeafCollector #88230
Conversation
…avour of #getLeafCollector(LeafReaderContext, LeafBucketCollector, AggregationExecutionContext)
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Curiosity question: should we also try to remove the |
Both are doable but not sure which one is the right answer. I think everything comes down to another tech debt issue we have in BucketCollector: elasticsearch/server/src/main/java/org/elasticsearch/search/aggregations/BucketCollector.java Line 44 in b55f3fb
This seems much harder to work on as we are trying to remove a method from the interface, effectively making the BucketCollector not a collector. |
We can't really use it as one any more anyway. I vote we remove the super-interface, especially if we can do it in a purely mechanical way. Personally I'd prefer to have the |
That is my vote as well but unfortunately it cannot be removed in a mechanical way. We relay that is a collector during the query phase and changing it seems a bit of work. |
I updated the PR so the signature of the method looks like: |
I think it's an improvement! |
@elasticmachine update branch |
Remove #getLeafCollector(LeafReaderContext, LeafBucketCollector) in favour of #getLeafCollector(LeafReaderContext, LeafBucketCollector, AggregationExecutionContext).
The PR is a non brainer just removing the old method and adding the new parameter to all implementations. See AggregationBase for the removal of the method.