mikebridge opened a new pull request, #44454: URL: https://github.com/apache/superset/pull/44454
### SUMMARY [SC-121337](https://app.shortcut.com/preset/story/121337): make same-name semantic dimension resolution independent of catalog iteration and worker hash seed. - Extract the existing metadata preference into one shared host helper: raw → finest known grain → lexical grain representation. - Apply it to metadata, both mapper name maps, and default/non-axis grouping fallbacks. Preserve explicit supported grouping choices. - Keep filters and time bounds on the default/raw variant independently of grouping; monthly grouping must not turn a mid-month bound into a month-bucket test. - Reject different IDs for the same dimension name and grain with a clear validation error, including ambiguous non-default variants. Draft for coordinated delivery. Merge order: **SC-120290 → SC-121337 → SC-121338**. No sibling changes are merged or cherry-picked here. A separate **superset-shell core-pin advance** and downstream verification follow the landed core changes; this PR does not update shell or establish deployment acceptance. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable: no UI changes. Before, name-map representatives depended on iteration order, and a no-raw fallback could choose Day before Hour alphabetically. After, the shared preference chooses the same provider identity for every catalog order, retaining monthly grouping and exact raw January 15 bounds. ### TESTING INSTRUCTIONS With the Python test environment activated: ```bash PYTHONPATH=.:superset-core/src python -m pytest \ tests/unit_tests/semantic_layers/mapper_test.py \ tests/unit_tests/semantic_layers/models_test.py \ tests/unit_tests/semantic_layers/dimension_resolution_test.py -q ``` Local evidence: **363 passed**; all changed-file pre-commit hooks pass, including MyPy, Ruff and Pylint. Python, Clean Code and semantic-layer local review found no actionable issues (implementing session; not an independent-agent review). The regression parametrizes all 24 catalog permutations per invocation using a set-subclass fixture and the declared SemanticView ABC. Under **every seed 1–6**, the original mapper gives **43 failed, 13 passed**, and the fixed mapper gives **56 passed** for the same focused selection. Final original-mapper/models revert control gives **44 failed, 13 passed**; exact file-content restoration returns the full suites to green. Metadata rank extraction was verified separately (108 tests pass before and after). For a manual provider check, expose raw/day/month/year variants named `event_time`, group by month, and filter `[2026-01-15, 2026-02-01)`: grouping should use month while both bounds use the raw identity. A provider with two distinct IDs for the same name/grain should report an ambiguity error. Live provider SQL/browser/shell behavior was not exercised locally. ### ADDITIONAL INFORMATION - [x] Has associated issue: [SC-121337](https://app.shortcut.com/preset/story/121337) - [x] Required feature flags: `SEMANTIC_LAYERS` - [ ] 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]
