chkang-idk2 opened a new pull request, #42559:
URL: https://github.com/apache/superset/pull/42559

   ### SUMMARY
   Fixes [#42340](https://github.com/apache/superset/issues/42340).
   
   When ECharts charts that share `eventHandlers.ts` (notably Pie) receive a 
click whose series `name` is not in `labelMap` — e.g. Pie **Other**, **Total**, 
or an empty/missing name — `getCrossFilterDataMask` still built a data mask. 
After `.filter(Boolean)`, `groupbyValues` could be empty while `values` was 
non-empty, which led to invalid cross-filters (`IN` with empty values, or 
unintended `IS NULL` because `[].every(...)` is `true`). Downstream charts then 
failed or returned wrong results.
   This change returns `undefined` early when `labelMap[value]` is missing, so 
`clickEventHandler` does not call `setDataMask`. That matches the existing 
context-menu guard that already no-ops when `labelMap[e.name]` is absent.
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A (behavior fix; no UI change). See the recording on 
[#42340](https://github.com/apache/superset/issues/42340) for the previous 
incorrect behavior.
   ### TESTING INSTRUCTIONS
   1. Create a dashboard with:
      - An ECharts Pie chart (groupby + metric), with **Show Total** enabled 
(and optionally **Threshold for Other**)
      - At least one other chart on the same / compatible dataset
   2. Enable dashboard cross-filtering
   3. Click the pie **Total** text and/or the **Other** slice
   4. Confirm other charts are **not** filtered / do not error
   5. Click a normal pie sector and confirm cross-filtering still works
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: 
[#42340](https://github.com/apache/superset/issues/42340)
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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]

Reply via email to