Copilot commented on code in PR #43308:
URL: https://github.com/apache/superset/pull/43308#discussion_r3809871733
##########
superset-frontend/plugins/plugin-chart-pivot-table/test/plugin/transformProps.test.ts:
##########
@@ -452,3 +452,82 @@ test('additive metrics: synthesizes rollup levels from a
single leaf query', ()
{ region: 'EU', v: 5 },
]);
});
+
+test('conditional formatting scales over leaf cells only, not rollup totals',
() => {
+ const gm = (col: string) => `${col}__superset_grouping`;
+ // A saved-metric reference is non-additive, so buildQuery issues a single
+ // GROUPING SETS query whose result carries the rollup levels alongside the
+ // leaf rows. Both totals toggles are on, so the grand total (100) is part of
+ // that result.
Review Comment:
The comment says this is a “saved-metric reference”, but the test uses
`metrics: ['SUM(sales)']`, which reads more like an adhoc/SQL label. Since the
behavior under test is “string metrics are treated as non-additive” (see
`isAdditiveMetric`), consider rewording the comment or using a clearly generic
string metric (e.g. `'m'`) to avoid confusing future readers about what the
string represents.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]