dosubot[bot] commented on issue #40289: URL: https://github.com/apache/superset/issues/40289#issuecomment-4506973877
<!-- Answer --> @manyyy Thanks for the feedback on the preferred approach. Here's an honest assessment: **Implementation complexity is higher than it appears.** The current `get_allows_alias_in_select()` signature only receives a `Database` object — it has **no access to whether the current dataset is a virtual table** [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py#L607-L618). The `is_virtual` flag exists on the `SqlaTable` model [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/connectors/sqla/models.py#L220-L237) and flows through query generation, but it's never passed down to the engine spec layer where this decision is made [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/models/helpers.py#L843-L858). **Realistic options with estimates:** | Approach | Effort | Risk | |----------|--------|------| | **(A) Modify method signature** to pass datasource context — cleanest but breaking change to 40+ engine specs | 5–7 days | Medium-high (interface change) | | **(B) Targeted call-site fix** — check `is_virtual` + engine type directly in `make_sqla_column_compatible()` before calling the engine spec method | 2–3 days | Low (no interface changes) | | **(C) Context variable** — thread virtual-table info via `contextvars` without signature changes | 3–4 days | Medium (hidden dependency, async concerns) | Option **(B)** is probably the most pragmatic path for a near-term fix — it avoids breaking the engine spec interface while still providing automatic detection. It's not architecturally pristine (engine-specific logic in generic code), but it's contained and testable. **Release timeline:** Superset follows a roughly monthly patch cadence. A targeted fix like Option B could realistically land in a patch release **within 1–2 months** of being merged, assuming a contributor picks it up and it passes review. That said, I can't commit to timelines on behalf of the maintainers — this depends on contributor availability and review bandwidth. If you or someone on your team is interested in submitting a PR, Option B would be the most straightforward to implement and get through review. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=3ee26c33-3d4a-4c40-80c0-c6745d07e685) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset) -- 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]
