You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/06/13 08:11:04 UTC

[PR] test(pie): guard NULL + named group values all render as slices (#33174) [superset]

rusackas opened a new pull request, #41018:
URL: https://github.com/apache/superset/pull/41018

   ### SUMMARY
   
   A test-only regression guard for #33174, where a Pie chart whose groupby dimension contains a NULL/empty value alongside named values reportedly dropped the named slices (or rendered only the NULL slice).
   
   I added a `Pie/transformProps` unit test using the exact data shape from the issue (two named groups + one NULL group, with NULL being the smallest value) and asserted that the transform keeps **one slice per input row**, maps the NULL group to the `<NULL>` placeholder, and preserves every other slice with its value.
   
   **This test PASSES on current `master`.** The `transformProps` layer handles NULL-mixed data correctly β€” `formatSeriesName` maps `null` to `<NULL>` and `transformedData` is built with a straight `data.map(...)`, so no row is dropped. That means the rendering drop described in the issue does **not** originate in `transformProps`.
   
   I'm filing this as an **honest green guard** rather than a fix because:
   
   - The reporter explicitly notes it **does not reproduce with sample data** (reported on 4.1.2 with a specific Korean-language dataset / DB view), and it isn't reproducible at the chart-transform layer.
   - Where a NULL-name collision *could* bite is cross-filtering (`labelMap` keys by computed name and `selectedValues` uses `findIndex`, so two rows that both render as `<NULL>` would share a filter index) β€” but that's a separate, narrower concern from the reported "named slices disappear" symptom and isn't exercised here.
   
   This PR pins the transform-layer contract so any future regression that *does* drop slices fails loudly, and localizes the residual investigation to the data layer / echarts rendering rather than the transform. Happy to extend it (e.g. a cross-filter assertion, or an E2E) if maintainers want to pursue the collision angle.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A β€” test-only.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npx jest plugins/plugin-chart-echarts/test/Pie/transformProps.test.ts -t "NULL group value"
   ```
   
   Expected: **passes** on master. It is a guard, not a failing reproduction.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #33174
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   πŸ€– Generated with [Claude Code](https://claude.com/claude-code)


-- 
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] test(pie): guard NULL + named group values all render as slices (#33174) [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41018:
URL: https://github.com/apache/superset/pull/41018#issuecomment-4697982700

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41018?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.28%. Comparing base ([`9e7e1ec`](https://app.codecov.io/gh/apache/superset/commit/9e7e1ecdbc3385932ee727b9c292559ff3ddf787?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8e1102c`](https://app.codecov.io/gh/apache/superset/commit/8e1102cedc8d5958510088d6b0dd89cfd1ba6b1a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #41018      +/-   ##
   ==========================================
   - Coverage   64.28%   64.28%   -0.01%     
   ==========================================
     Files        2659     2659              
     Lines      144300   144300              
     Branches    33260    33260              
   ==========================================
   - Hits        92760    92759       -1     
   - Misses      49907    49908       +1     
     Partials     1633     1633              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41018/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/41018/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.25% <ΓΈ> (-0.01%)` | :arrow_down: |
   
   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/41018?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] test(pie): guard NULL + named group values all render as slices (#33174) [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41018:
URL: https://github.com/apache/superset/pull/41018#issuecomment-4697960403

   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] test(pie): guard NULL + named group values all render as slices (#33174) [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber merged PR #41018:
URL: https://github.com/apache/superset/pull/41018


-- 
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