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


##########
superset/mcp_service/dataset/tool/query_dataset.py:
##########
@@ -390,23 +430,25 @@ async def query_dataset(  # noqa: C901
             % (len(data), len(raw_columns), query_duration_ms)
         )
 
-        return QueryDatasetResponse(
-            from_dttm=query_result.get("from_dttm"),
-            to_dttm=query_result.get("to_dttm"),
-            dataset_id=dataset.id,
-            dataset_name=dataset_name,
-            columns=columns_meta,
-            data=data,
-            row_count=len(data),
-            total_rows=query_result.get("rowcount"),
-            summary=summary,
-            performance=PerformanceMetadata(
-                query_duration_ms=query_duration_ms,
-                cache_status=cache_label,
-            ),
-            cache_status=cache_status,
-            applied_filters=effective_filters,
-            warnings=warnings,
+        return _bounded_response(

Review Comment:
   Agreed. Added in d6137b1fc76c09d3be930140aa58cf0d61cf3c2a: 
`test_query_dataset_rejects_oversized_complete_response` calls the registered 
`query_dataset` tool with only `ChartDataCommand` mocked, using 255 rows with a 
unique 64 KiB `category` cell each. It first asserts `query_result_data` 
accepts that source result, then asserts the tool returns 
`MalformedQueryResult` with no `data`. With `_bounded_response` disabled 
locally, this is the only test in `test_query_dataset.py` that fails.



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