shivamgoel commented on code in PR #43527:
URL: https://github.com/apache/superset/pull/43527#discussion_r3859175079
##########
superset/mcp_service/semantic_layer/tool/get_table.py:
##########
@@ -191,59 +195,31 @@ def _validate_request_names(
request: GetTableRequest, valid_columns: set[str], valid_metrics: set[str]
) -> list[str]:
"""Validate requested dimensions, metrics, filters, and order_by names."""
- validation_errors: list[str] = []
- validation_errors.extend(
- validate_names(request.dimensions, valid_columns, "dimension")
- )
- validation_errors.extend(
- validate_names(
- request.metrics,
- valid_metrics,
- "metric",
- empty_hint=_NO_METRICS_HINT,
- list_valid_on_miss=True,
- full_list_hint="call list_metrics for the full list",
- )
- )
- filter_cols = [f.col for f in request.filters]
- validation_errors.extend(
- validate_names(filter_cols, valid_columns, "filter column")
+ return validate_query_names(
Review Comment:
Regression on my part. Hint is a parameter now; get_table passes
list_metrics. Added a >10-metric test.
--
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]