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

Refactor aggregator test case #90149

Merged
merged 14 commits into from
Sep 20, 2022

Conversation

not-napoleon
Copy link
Member

This refactors searchAndReduce to use a parameter object, which removes a bunch of redundant overrides, and makes life much easier for adding new parameters in the future. I need that second part to add a parameter for testing caching over in #90114 so that the exactly two tests which are failing can tell the framework they don't actually expect to be cached.

Yaks--;

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

That's much nicer!

MappedFieldType... fieldTypes) {
public AggTestConfig(IndexSearcher searcher, Query query, AggregationBuilder builder, MappedFieldType... fieldTypes) {
this(searcher, query, builder, DEFAULT_MAX_BUCKETS, randomBoolean(), fieldTypes);
}
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if Query should default to MatchAllDocs. Otherwise, 👍

* @param splitLeavesIntoSeparateAggregators If true this creates a new {@link Aggregator}
* for each leaf as though it were a separate index. If false this aggregates
* all leaves together, like we do in production.
* @param aggTestConfig
Copy link
Member

Choose a reason for hiding this comment

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

Zap this?

@not-napoleon
Copy link
Member Author

@elasticmachine update branch

@not-napoleon not-napoleon merged commit 15932d5 into elastic:main Sep 20, 2022
@not-napoleon not-napoleon deleted the refactor-aggregator-test-case branch September 20, 2022 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >non-issue >refactoring Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >tech debt v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants