fitzee opened a new pull request, #45311: URL: https://github.com/apache/superset/pull/45311
### SUMMARY Fixes #44725. Continues #44730 with the original commits by @itzzdev09 preserved, following the author's handoff. The branch is updated with current master (`c969ac425d`). **Depends on #44657; do not merge this before the browser fix.** That PR is still open. This PR remains draft to make the outstanding dependency explicit. Exports and scheduled reports must leave totals blank when a cell combines different metrics. The original change handled percentages and database rollups, but Actual Values without GROUPING SETS still added metrics together. For example, SUM and MAX could produce mixed totals of 14 / 26 / 40. This completes the Actual Values path and keeps the grand-total corner blank even when pandas would sum an all-blank column to zero. Metric-specific cells and totals retain their existing behavior. Both rollup consumers share the metric resolver and use a precomputed set for membership checks. Currency-context aggregation remains unchanged. The original `min_count=1` change also keeps an all-empty rollup blank instead of zero; regression coverage distinguishes empty values from a real zero. The separate single-MAX additive-total issue noted on #44730 is not changed here. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF No visual component changes. Mixed-metric Total cells in exported data change from an arbitrary metric or cross-metric sum to blank, matching the browser behavior proposed in #44657. This applies to both metrics-on-columns and metrics-on-rows layouts, including the grand-total corner. ### TESTING INSTRUCTIONS Completed locally: - `pytest tests/unit_tests/charts/ -q`: **374 passed, 2 xfailed**. - Full pre-commit checks on the changed files pass, including mypy, Ruff, and Pylint. - A 16-case regression matrix covers Actual Values and all three percentage modes, both metric layouts, and data with/without GROUPING SETS. It checks blank mixed totals and retained metric-specific values. - Negative control against #44730's implementation on updated master: the two Actual Values/no-rollup cases fail; the other 14 cases pass. - Existing snapshots updated for blank mixed-metric totals; leaf and metric-specific totals remain unchanged apart from numeric display formatting caused by NaNs. After #44657 lands, manually compare Explore with CSV/Excel and a scheduled report using two metrics, both totals enabled, both metric layouts, and each Show Values As mode. Mixed Total cells should be blank and metric-specific values should agree. Live browser/report verification has not been run locally; fresh CI is required. The previous #44730 Playwright failure was chart creation failing with a duplicate `tag_name_key`, outside this code path. ### ADDITIONAL INFORMATION - [x] Has associated issue: #44725 - [ ] Required feature flags - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in SIP-59) - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
