Skip to content

Conversation

@ivancea
Copy link
Contributor

@ivancea ivancea commented Nov 20, 2025

Fixes #132879
Fixed #132880

Ignore doc_count_error_upper_bound in response comparison for terms aggs in CCSDuelIT, and unmute tests.

It was failing sometimes with a: doc_count_error_upper_bound: expected Integer [5] but was Integer [2]

Given it's an estimation (From https://www.elastic.co/docs/reference/aggregations/search-aggregations-bucket-terms-aggregation), ignoring should be safe for the test purposes.

@ivancea ivancea requested review from quux00 and smalyshev November 20, 2025 15:30
@ivancea ivancea added >test Issues or PRs that are addressing/adding tests :Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.3.0 labels Nov 20, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link

@cimequinox cimequinox left a comment

Choose a reason for hiding this comment

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

This change extends the differenceBetweenMapsIgnoringArrayOrder utility.
This utility finds differences in two trees of Map<String,Object> nodes where the
string is the node's name and the object appears to be the nodes children which
may be a Map or List of maps. The existing logic compares two trees, descending
the first looking for a difference in the second until one is found.

This extends the logic to accept a pathFilter predicate allowing subtrees matching a path to be skipped and uses the enhancement to instruct testTermsAggs and testTermsAggsWithProfile to skip doc_count_error_upper_bound subtrees by passing the predicate path -> path.endsWith("/doc_count_error_upper_bound") == false.

The change includes unit tests for the enhancement and unmutes two tests as specified in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CCSDuelIT test testTermsAggsWithProfile failing CCSDuelIT test testTermsAggs failing

3 participants