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


##########
superset/mcp_service/semantic_layer/tool/get_table.py:
##########
@@ -207,15 +268,31 @@ def _validate_request_names(
         # cannot resolve.
         metrics_full_list_hint="call list_metrics for the full list",
     )
+    base: str
+    separator: str
+    suffix: str
+    for dimension in request.dimensions:
+        base, separator, suffix = dimension.rpartition("__")
+        if dimension not in valid_columns and base in valid_columns:
+            for duration, name in (valid_grains or {}).items():

Review Comment:
   My r2 suggestion restored the view-wide union here while validation went 
per-column, so the hint dead-ends: `metric_time` Day/Month + `signup_date` 
Day-only ⇒ `signup_date__Month` is told to pass `time_grain='P1M'`, which 
errors `Queryable grains: P1D (Day)`. Fix spans 3 sites.



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