-
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
Fix missing column totals in data table. #34169
Conversation
The data table relies on `isNumeric` and `isDate` params to be defined on each dimension so that it can determine how to calculate and format column totals when they are enabled. These params were missing from the `getSchemas` utility, causing the data table to render empty rows for totals. Fixes elastic#34046
src/legacy/ui/public/visualize/loader/pipeline_helpers/build_pipeline.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
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.
we are adding isDate and isNumber to schema config but:
- this seems to be more related to schema format ?
- this seems to only be needed by table vis ?
- we already have schema.params.date (and now introducing isDate)
Took a more minimal approach per discussion with @ppisljar... The Kept the |
💔 Build Failed |
💚 Build Succeeded |
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.
totals don't work for terms aggregation on number field (not sure if that was ever a thing)
apart from that LGTM (tested in chrome linux)
💚 Build Succeeded |
@lukeelmers We're using 7.1.1 and we don't see the total row, is the fix in that version? |
@tzachshabtay Yes, the fix made it to the I just tested in What type of aggregation are you using where you aren't seeing the totals? |
@lukeelmers we upgraded to 7.2 but it's still not showing. If we switch to count as our "total function" then it does show, but any other total function doesn't show (and it did show on kibana 6.x). Some screenshots of our setup: |
Seems to be fixed in version 7.3.0. |
Fixes #34046
Regression seems to have been introduced in #28746
The data table relies on
isNumeric
andisDate
params to be definedon each dimension so that it can determine how to calculate and format
column totals when they are enabled.
These params were missing from the
getSchemas
utility, causing thedata table to render empty rows for totals.
We have tests to catch this, but they were using mocked data with the
correct params, while the actual code was generating dimensions
without those params.
This is another case we should consider when adding tests for
getSchemas
in #33196.