bito-code-review[bot] commented on PR #44657:
URL: https://github.com/apache/superset/pull/44657#issuecomment-5835866173
<!-- Bito Reply -->
The flagged issue is correct. In the current implementation, when multiple
metrics are present, the grand-total cell receives records from different
metrics. Previously, it would display the value of the last metric pushed,
which is misleading. The fix correctly detects metric mismatches in
`cellValue.push()` and returns `null` in `value()`, ensuring the cell renders
as blank instead of an incorrect or meaningless number.
To resolve this, the implementation in
`superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts`
is already updated in the PR to track `seenMetric` and `mixedMetrics` state,
and `value()` is updated to return `null` when `mixedMetrics` is true. No
further code changes are required for this specific issue.
Would you like me to check the rest of the comments on this PR to see if
there are other issues that need fixing?
**superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts**
```
value() {
return this.mixedMetrics ? null : this.val;
},
```
--
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]