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 — the grain set is now the intersection across the
selected time columns rather than the 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` and `grain_column` now resolve to the same
column; a mismatch is rejected with the guard error rather than silently taking
the first.
--
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]