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: [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]

Reply via email to