Mayankaggarwal8055 opened a new pull request, #38689: URL: https://github.com/apache/superset/pull/38689
### What problem does this solve? This PR fixes an issue where filtering can fail when a column has a `verbose_name`. Currently, both `column_name` and `verbose_name` are added to the `columns_by_name` mapping, but if they conflict, the `verbose_name` can override the actual `column_name`. This leads to incorrect column resolution during query building, causing filters to break or behave unexpectedly. ### What does this PR do? - Ensures that `column_name` remains the primary and authoritative key in `columns_by_name` - Adds `verbose_name` only as a secondary alias, and only when it does not conflict with an existing key - Prevents accidental overriding of real column mappings ### Why is this change needed? `column_name` is the actual identifier used in SQL queries, while `verbose_name` is meant for display purposes. Allowing `verbose_name` to override `column_name` breaks this distinction and can lead to invalid or incorrect queries. This change keeps the behavior predictable and ensures filters work correctly regardless of `verbose_name`. ### Testing - Verified that filtering works correctly using both `column_name` and `verbose_name` - Confirmed that no existing behavior is affected when there are no naming conflicts ### Related issue Closes #38310 -- 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]
