You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "amaannawab923 (via GitHub)" <gi...@apache.org> on 2026/06/24 12:56:10 UTC
[PR] fix(plugin-chart-ag-grid-table): show correct percentage metric value in summary row [superset]
amaannawab923 opened a new pull request, #41387:
URL: https://github.com/apache/superset/pull/41387
### SUMMARY
On an interactive table with a metric in **Percentage Metrics** and **Show Summary** enabled, the summary/footer row showed `0.000%` for the percentage column while the regular rows were correct.
The totals query was being built with an empty `post_processing` list. That dropped the `contribution` step that renames a percent-metric column from `metric` to `%metric`. The result was that the totals came back keyed under the original metric name, while the grid was reading the `%`-prefixed one — so it found nothing and rendered `0.000%`.
The fix keeps the percent-metric `contribution` (rename) step on the totals query, while still dropping the time-comparison operator and ordering that aren't needed for an aggregate-only query.
### TESTING INSTRUCTIONS
1. Open/create an interactive table on any dataset.
2. Add a metric to **Metrics** and the same metric to **Percentage Metrics**.
3. Enable **Show Summary** and update the chart.
4. The percentage column in the summary row should show a real aggregated value instead of `0.000%`.
Added a buildQuery test asserting the totals query keeps the contribution/rename op for percent metrics; the rest of the buildQuery suite still passes.
### ADDITIONAL INFORMATION
- [x] Changes UI
--
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
Re: [PR] fix(ag-grid): show correct percentage metric value in summary row [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #41387:
URL: https://github.com/apache/superset/pull/41387#issuecomment-6111520490
Closing this one since @kgabryje's #41247 landed the same percent-metric totals fix on `master` back in June. Thanks for the regression test either way @amaannawab923! Please feel free to reopen or comment if there's more to be done here.
--
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
Re: [PR] fix(plugin-chart-ag-grid-table): show correct percentage metric value in summary row [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41387:
URL: https://github.com/apache/superset/pull/41387#issuecomment-4789513874
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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
Re: [PR] fix(ag-grid): show correct percentage metric value in summary row [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #41387: fix(ag-grid): show correct percentage metric value in summary row
URL: https://github.com/apache/superset/pull/41387
--
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
Re: [PR] fix(ag-grid): show correct percentage metric value in summary row [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41387:
URL: https://github.com/apache/superset/pull/41387#issuecomment-4789602234
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41387?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.42%. Comparing base ([`a57b5f6`](https://app.codecov.io/gh/apache/superset/commit/a57b5f6078056e411278cbb93d3595d4cdebe62a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`cbcf755`](https://app.codecov.io/gh/apache/superset/commit/cbcf75514fa35f9beb9ad30f5af28fe72ad2bc3c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41387 +/- ##
=======================================
Coverage 64.42% 64.42%
=======================================
Files 2654 2654
Lines 145386 145388 +2
Branches 33557 33557
=======================================
+ Hits 93658 93660 +2
Misses 50031 50031
Partials 1697 1697
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41387/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/41387/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.73% <100.00%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41387?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] fix(ag-grid): show correct percentage metric value in summary row [superset]
Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on PR #41387:
URL: https://github.com/apache/superset/pull/41387#issuecomment-4834362023
## EnxDev's Review Agent — apache/superset#41387 · HEAD cbcf755
lgtm — correct, targeted fix for the percent-metric summary row, with a real regression guard. CI green.
Verified the fix closes the loop. The totals query (`columns: []`, single aggregated row) now keeps the `contribution` op, so `contribution.py` renames `revenue` → `%revenue` and the totals object gains the `%`-prefixed key the grid reads (`transformProps.ts:721` → `totals['%revenue']`, column key built at `transformProps.ts:356`). Before, `post_processing: []` left totals keyed only under `revenue`, so the grid found nothing → `0.000%`. The `.filter(operation === 'contribution')` correctly retains the rename while dropping the time-comparison operator, matching the cleared `orderby`/`order_desc`.
### 🔵 Nits
- `buildQuery.ts:661` — by construction the summary always renders **100%** for the percent column (single-row contribution: `value / sum([value]) = 1.0`, see `contribution.py:95`). That's the consistent "sum of contributions" semantics and reads fine, just confirming it's intended vs. the legacy `plugin-chart-table`, whose totals query still uses `post_processing: []` (`buildQuery.ts:328`) and leaves the percent total blank. This PR is arguably the better behavior — worth aligning the two plugins eventually.
- `test/buildQuery.test.ts:1383,1390` — `(op: any)` / `as any` casts; minor, and consistent with the surrounding suite.
### 🙌 Praise
- The added test is a genuine red-before/green-after guard — it asserts the `contribution` op survives on the totals query and that `rename_columns` contains `%revenue`, which is exactly the dropped behavior.
- `buildQuery.ts:655` — clear comment tying the change to the symptom and #104600, and noting why the time-comparison op is intentionally dropped.
<!-- enxdev-review-agent:cbcf755 -->
_Reviewed by EnxDev's Review Agent — @EnxDev · HEAD cbcf755._
--
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