You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/16 11:11:44 UTC

[GitHub] [superset] kgabryje commented on a change in pull request #19102: fix: string aggregation is incorrect in PivotTableV2

kgabryje commented on a change in pull request #19102:
URL: https://github.com/apache/superset/pull/19102#discussion_r827890007



##########
File path: superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.js
##########
@@ -353,7 +370,7 @@ const baseAggregatorTemplates = {
                 throw new Error('unknown mode for runningStat');
             }
           },
-          format: formatter,
+          format: x => (typeof x === 'string' ? x : formatter(x)),

Review comment:
       Nit: since we do the same operation in line 241, could you extract that logic to a function?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org