betodealmeida opened a new pull request, #25882: URL: https://github.com/apache/superset/pull/25882
<!--- 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 --> DB engine specs have an attribute called `allows_alias_in_select`, indicating if they support aliases in `SELECT` statements. For Dremio, this attribute is version dependent — see the fix in [their release notes](https://docs.dremio.com/current/release-notes/version-240-release/#2410-release-notes-june-2023). Because of that, we've been ping-ponging on the attribute. First I disabled it in https://github.com/apache/superset/pull/23872, and later it was re-enabled in https://github.com/apache/superset/pull/25657 when the fix came out. Since we have Superset users running older versions, I added a new class method `get_allows_alias_in_select`, that uses the `version` field in the database extra configuration. Note that this requires users running Dremio < 24.1.0 to explicitly add the `version` field when configuring their databases. I'm not sure if we could determine the version at runtime, but even if we could it would require us to run a pre-query every time, which is needlessly expensive. Also note that the `version` field is already used in Presto for version-dependent features. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> N/A ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> ### 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]
