-
- Downloads
Pivot Exports Can Handle `nil` in Breakout Col, and Multiple Cols of the Same...
Pivot Exports Can Handle `nil` in Breakout Col, and Multiple Cols of the Same Aggregation Type (#50672) (#50780)
* Pivot Exports Can Handle `nil` in Breakout Col, and Multiple Cols of the Same Aggregation Type
Fixes #50551
If a pivot table has several measures configured, they might both use the same kind of
aggregation (eg. 'sum'). Previously, this would lead to columns with the same name preventing the pivot-measures from
properly making it through the export post processing. Now, the correct aliased/deduped name is used and all columns
can be properly included in the pivot export.
Also fixes the case where a breakout column (pivot-row) contains `nil` values, which caused the pivot export to
fail. Now, all nil values are grouped and handled appropriately.
* when pivot is disabled, header should still be included
* min and max don't default to 0, add a test for the aggregations
Co-authored-by:
adam-james <21064735+adam-james-v@users.noreply.github.com>
Showing
- src/metabase/query_processor/pivot.clj 5 additions, 1 deletionsrc/metabase/query_processor/pivot.clj
- src/metabase/query_processor/pivot/postprocess.clj 11 additions, 6 deletionssrc/metabase/query_processor/pivot/postprocess.clj
- src/metabase/query_processor/streaming/csv.clj 1 addition, 1 deletionsrc/metabase/query_processor/streaming/csv.clj
- test/metabase/api/downloads_exports_test.clj 189 additions, 1 deletiontest/metabase/api/downloads_exports_test.clj
Please register or sign in to comment