Skip to content

Conversation

@iverase
Copy link
Contributor

@iverase iverase commented Sep 18, 2020

Currently we always call reduce even when we only have one InternalAggregation. In some cases this is necessary but in others the reduce method is just making a copy of itself. This is normally not too expensive excepts for aggregations that hold expensive objects, for example cardinality or percentile aggregations.

In order to prevent this necessary step this PR adds a new abstract method in InternalAggregation that flags the framework if it needs to reduce on a single InternalAggregation.

backport #62525

…#62525)

Adds a new abstract method in InternalAggregation that flags the framework if it needs to reduce on a single InternalAggregation.
@iverase
Copy link
Contributor Author

iverase commented Sep 18, 2020

@elasticmachine run elasticsearch-ci/1

@iverase iverase merged commit 6a3d731 into elastic:7.x Sep 18, 2020
@iverase iverase deleted the backport62525 branch September 18, 2020 06:44
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.

1 participant