mikebridge commented on code in PR #44270:
URL: https://github.com/apache/superset/pull/44270#discussion_r4041159196
##########
superset/mcp_service/semantic_layer/tool/get_table.py:
##########
@@ -180,8 +194,42 @@ def _resolve_external_view(
error_type="ValidationError",
)
+ valid_grains: dict[str, str] = {
+ duration: grain["name"]
+ for grain in view.get_time_grains()
Review Comment:
Addressed in 03ed7c6 — `valid_grains` is now built from the grain variants
of the selected time column only (matched by dimension name), not the view-wide
union.
##########
superset/mcp_service/semantic_layer/tool/get_table.py:
##########
@@ -180,8 +194,42 @@ def _resolve_external_view(
error_type="ValidationError",
)
+ valid_grains: dict[str, str] = {
+ duration: grain["name"]
+ for grain in view.get_time_grains()
+ if (duration := grain["duration"]) is not None
+ }
+ grain_column: str | None = request.time_column
Review Comment:
Addressed in 03ed7c6 — `time_col` is now set from `grain_column`, so the
same column drives both the filter and the grain axis; the error message names
the column.
--
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]