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

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Cross-filtering from an Interactive Table stops working when a user renames 
a column label via Custom SQL in the Explore view. The table emits the renamed 
label (e.g. country_code_renamed) as the filter column name, but the receiving 
chart looks it up by the actual database column name (country_code), so the 
filter is silently dropped.
   
   The fix builds a label-to-column-name mapping from the form data's adhoc 
column definitions and resolves the label back to the original sqlExpression 
before emitting the cross-filter.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   - Before
   
   
https://github.com/user-attachments/assets/a7bec3fa-b4a3-41b3-a273-dfd0b6b18685
   
   
   - After
   
   
   
https://github.com/user-attachments/assets/1db96979-09a8-44f2-86f7-e11f964d6055
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   1. Create a Table chart with any dataset using a couple of columns (e.g. 
state, gender)
   2. Create a second chart (e.g. Bar) on the same dataset using one of the 
same columns
   3. Place both on a dashboard — verify cross-filtering works (click a cell in 
the Table, the Bar chart filters)
   4. Edit the Table chart, click the state column pill, switch to the Custom 
SQL tab, change the label to State_Renamed, save
   5. Return to the dashboard and click any cell in the State_Renamed column
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] 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