-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Aggs] Force return 0 on empty buckets on count if null flag is disabled #207308
base: main
Are you sure you want to change the base?
Conversation
/ci |
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code & functionality LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't fully solve what was requested in the original issue.
null/zero is one thing, but the fact that count with timeshift doesn't use the extended_bounds
is not addressed by the PR.
Actually not just count but also other metrics doesn't include the extended_bounds when using timeshift.
This results is missing buckets at the beginning and end of the table if they are empty/zero.
src/platform/plugins/shared/data/common/search/aggs/metrics/count.test.ts
Outdated
Show resolved
Hide resolved
If I'm not wrong the current concept of
But in this PR we are also doing the opposite: we are saying that |
I do not think the problem is related with the If we want to extends this behaviour to other aggs as well I think we'll need to rethink the agg model and how they work. |
…unt.test.ts Co-authored-by: Marco Vettorello <[email protected]>
Discussed offline with @markov00 this PR. For the partial result we've tested a PoC who seems to work, but needs to be validated in a follow up PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…unt.ts Co-authored-by: Peter Pisljar <[email protected]>
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Page load bundle
History
|
Summary
Fixes #206555
This PR is an attempt to address the
null
bucket issue withcount
in Lens formula via theemptyAsNull
flag.Checklist
Risks
This PR introduces potentially some breaking changes, as count
null
values, in particular coming from shifted computations, as now converted to0
if the flag has been enabled.This change is not news in the code base as other aggs like
distinct_count
orvalue_count
already implements it, but notcount
.Apparently no test failed with this change, I've also added new unit ones to freeze the current behaviour and detect future changes.