msyavuz opened a new pull request, #44649: URL: https://github.com/apache/superset/pull/44649
### SUMMARY **Problem:** In Table and Table V2 with Time Comparison, columns using the "Auto-detect" currency render plain numbers unless the currency code column is added to the chart. `getComparisonColFormatter` built a `CurrencyFormatter` from the raw `AUTO` currency, which only resolves per row from the currency code column, while the main columns already fell back to the backend's `detected_currency`. **Solution:** Move the detected-currency fallback into a shared `resolveDetectedCurrency` helper in `superset-ui-core/currency-format` and use it for both main and comparison columns in both table plugins, replacing the duplicated inline logic. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Comparison column with AUTO currency, GBP detected, currency code column not in the chart: before `100`, after `£ 100`. ### TESTING INSTRUCTIONS `npm run test -- currency-format/utils.test.ts plugin-chart-table/test/TableChart.test.tsx plugin-chart-ag-grid-table/test/transformProps.test.ts` Manual: set a dataset currency code column, give a metric's Main/#/△ columns "Auto-detect" currency, enable Time Comparison without adding the currency column. The symbol now shows. ### ADDITIONAL INFORMATION - [ ] Has associated issue: No - [ ] Required feature flags: No - [x] Changes UI: Yes, comparison columns now show the detected currency symbol - [ ] Includes DB Migration: No - [ ] Introduces new feature or API: No, adds an internal `resolveDetectedCurrency` export to `@superset-ui/core` - [ ] Removes existing feature or API: No -- 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]
