-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Fix agg datatable type #90574
Fix agg datatable type #90574
Conversation
Pinging @elastic/kibana-app-services (Team:AppServices) |
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.
Did not run the change, but looks good.
params: { | ||
id: 'number', | ||
}, | ||
source: 'esaggs', | ||
sourceParams: { | ||
appliedTimeRange: undefined, |
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.
Looks like this is added because count
is handled in a unique way, but most metrics have this?
@elasticmachine merge upstream |
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 changes LGTM.
/cc @ppisljar as he knows more about agg types.
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
The
TabbedAggResponseWriter
turning the response from Elasticsearch into a datatable is inferring thetype
of the datatable column using the type of the underlying field. While this is a good strategy for most aggregations, it doesn't work for cardinality - a string field will produce a number value as well for this aggregation.This PR adds a way to specify the expected column type if it diverges from the field type.
Context of this is #89300 which is using this value to determine how to align text in a data table.