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


##########
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:
   Breaks CI's `test_list_metrics_embedded_page_byte_bound`: its fixture binds 
only `get_compatible_dimensions` onto a MagicMock, so `self._compat_selection` 
returns a mock and unpacking fails. Fix in that fixture: 
`view._compat_selection = MethodType(SemanticView._compat_selection, view)`.



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