dosubot[bot] commented on issue #37620: URL: https://github.com/apache/superset/issues/37620#issuecomment-3838361725
<!-- Answer --> The root cause is that the Currency code column dropdown in the Dataset Editor only includes columns where `type_generic === GenericDataType.String`, which excludes calculated columns since their `type_generic` is `null`. Calculated columns are present in `allColumns` and can be identified by a truthy `expression` property, but the current filter misses them. Your proposed fix—to loosen the filter so it includes columns with either `type_generic === GenericDataType.String` or an `expression`—will resolve the issue and allow calculated columns to appear in the dropdown. This change is frontend-only, requires no backend updates, and is safe because the currency formatting logic already handles invalid or unresolved codes gracefully. Recent PRs and issues have focused on currency code column features and Dataset Editor improvements, but none have addressed this specific bug or filtering logic, so your change would be a new and needed improvement [PR #36416](https://github.com/apache/superset/pull/36416) [PR #37165](https://github.com/apache/superset/pull/37165). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6c98b3f6-ccf1-4420-b2f3-39e4386b6dd8?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=The%20root%20cause%20is%20that%20the%20Currency%20code%20column%20dropdown%20in%20the%20Dataset%20Editor%20only%20includes%20columns%20where%20%60type_generic%20%3D%3D%3D%20GenericDataType.String%60%2C%20which%20excludes%20calculated%20columns%20since%20their%20%60type_generic%60%20is%20%60null%60.%20Calculated%20columns%20are%20present%20in%20%60allColumns%60%20and%20can%20be%20identified%20by%20a%20truthy%20%60expression%60%20property%2C%20but%20the%20current%20filter%20misses%20them.%0A%0AYour%20proposed%20fix%E2%80%94to%20loosen%20the%20filter%20so%20it%20includes%20columns%20with%20either%20%60type_generic%20%3D%3D%3D%20GenericDataType.String%60%20or%20an%20%60expression%60%E2%80%94will%20resolve%20the%20issue%20and%20allow%20calculated%20colu mns%20to%20appear%20in%20the%20dropdown.%20This%20change%20is%20frontend-only%2C%20requires%20no%20backend%20updates%2C%20and%20is%20safe%20because%20the%20currency%20formatting%20logic%20already%20handles%20invalid%20or%20unresolved%20codes%20gracefully.%0A%0ARecent%20PRs%20and%20issues%20have%20focused%20on%20currency%20code%20column%20features%20and%20Dataset%20Editor%20improvements%2C%20but%20none%20have%20addressed%20this%20specific%20bug%20or%20filtering%20logic%2C%20so%20your%20change%20would%20be%20a%20new%20and%20needed%20improvement%20%5BPR%20%2336416%5D%28https%3A//github.com/apache/superset/pull/36416%29%20%5BPR%20%2337165%5D%28https%3A//github.com/apache/superset/pull/37165%29.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https% 3A//github.com/apache/superset/issues/37620) -- 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]
