-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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: string aggregation is incorrect in PivotTableV2 #19102
fix: string aggregation is incorrect in PivotTableV2 #19102
Conversation
a4865a1
to
e4bed2d
Compare
@@ -353,7 +370,7 @@ const baseAggregatorTemplates = { | |||
throw new Error('unknown mode for runningStat'); | |||
} | |||
}, | |||
format: formatter, | |||
format: x => (typeof x === 'string' ? x : formatter(x)), |
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.
Nit: since we do the same operation in line 241, could you extract that logic to a function?
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.
Added 1 minor comment. Looks great!
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.
@kgabryje I only made the changes for the ones present in v1. Can make it for all options if you're ok with it. |
e4bed2d
to
2d2df68
Compare
2d2df68
to
c049209
Compare
Codecov Report
@@ Coverage Diff @@
## master #19102 +/- ##
=======================================
Coverage 66.51% 66.52%
=======================================
Files 1715 1715
Lines 65060 65076 +16
Branches 6723 6723
=======================================
+ Hits 43272 43289 +17
Misses 20076 20076
+ Partials 1712 1711 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@kgabryje can you re-review this when you get a chance? thanks! |
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, thanks for the fix... and sorry for a very late review
* fix: string aggregation is incorrect in PivotTableV2 * cleanup * fix * updates
SUMMARY
The aggregation functions for PivotTableV2 only take into account numeric values.
This PR adds support for strings, only for the aggregation functions that were supported on PivotTable originally.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-03-10.at.12.53.11.mov
TESTING INSTRUCTIONS
Follow the example described in the issue
ADDITIONAL INFORMATION
Fixes #18572