mikebridge commented on code in PR #44454:
URL: https://github.com/apache/superset/pull/44454#discussion_r4212093188


##########
superset/semantic_layers/models.py:
##########
@@ -833,11 +818,12 @@ def get_compatible_dimensions(
         Collapse grain variants into sorted unique names, also bounding
         the shared list_metrics projection.
         """
-        metric_map = {m.name: m for m in self.implementation.get_metrics()}
-        dim_map = {d.name: d for d in self.implementation.get_dimensions()}
-        sel_metrics = {metric_map[n] for n in selected_metrics if n in 
metric_map}
-        sel_dims = {dim_map[n] for n in selected_dimensions if n in dim_map}
-        compatible = self.implementation.get_compatible_dimensions(
+        sel_metrics: set[Metric]
+        sel_dims: set[Dimension]
+        sel_metrics, sel_dims = self._compat_selection(

Review Comment:
   Good catch, this was fixture-only. 
[42214ea](https://github.com/apache/superset/commit/42214ea260cc4db845a21ac73b2b9933431e0adf)
 delegates to a real `SemanticView` instance with the same mocked provider, so 
the extracted helper executes normally without coupling the fixture to another 
private-method binding. The original test failed before that repair, passes 
after, and Python CI passed at that revision. Follow-up 
[231cb9e](https://github.com/apache/superset/commit/231cb9e7cade5d652deaf3b18cf8e704d4948b8f)
 adds the two requested grain-boundary tests, and all 30 permutations pass 
without a production change.



-- 
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]

Reply via email to