mikebridge opened a new pull request, #42534: URL: https://github.com/apache/superset/pull/42534
### SUMMARY **Supersedes #41509** (same commits, rebased onto current master — @betodealmeida remains the author; re-filed from a fork because the original branch lives on apache/superset and went stale after the author's departure). In Explore, hide the "Samples" tab when visualizing a semantic view, and disable Drill to Detail on semantic-view charts — both surfaces built queries with adhoc metrics, which semantic views reject, producing `HTTP 500 "Adhoc metrics are not supported in Semantic Views"` rendered as raw text (confirmed identical across Snowflake/dbt, BigQuery/dbt, and Cube fixtures). Mechanism: `ExplorableData` gains a `supports_samples` flag; semantic-view datasources set it false, the DataTablesPane omits the Samples tab, the drill-to-detail menu items disable with an explanatory tooltip, and the `/datasource/samples` path guards against the unsupported case rather than 500ing. Rebase notes (delta vs #41509 at `f4d4caf3ca`): one conflict in `superset/superset_typing.py` — union with master's new `rls_filters` field on the same TypedDict. No other changes. Closes sc-107949. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <img width="1728" height="1080" alt="Samples tab hidden for semantic views" src="https://github.com/user-attachments/assets/49d22ce7-6220-4b99-99bd-b2f5b98f8c95" /> ### TESTING INSTRUCTIONS 1. Open any semantic view in Explore (`/explore/?datasource_type=semantic_view&datasource_id=<id>`): the results panel shows only Results — no Samples tab, no 500. 2. Regular datasets: Samples tab unchanged. 3. On a dashboard, open the 3-dots menu on a semantic-view chart: Drill to Detail is disabled with a tooltip (previously opened a modal with 0 rows + the adhoc-metrics error). 4. Unit coverage: `tests/unit_tests/common/test_query_actions_drill_detail.py`, `tests/unit_tests/semantic_layers/models_test.py`, `tests/unit_tests/views/datasource/views_test.py` (89 tests), plus DataTablesPane/SamplesPane/DrillDetail jest suites. QA re-run list (from sc-107949): TC30 Samples tab on Snowflake/BigQuery/Cube suites; TC08 drill halves; dashboard TC16 drill-to-detail. ### ADDITIONAL INFORMATION - [x] Has associated issue: sc-107949 (Preset Shortcut); supersedes #41509 (approved there by @mikebridge + @rebenitez1802 before it went stale) - [ ] Required feature flags: - [x] 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 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
