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


##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -249,6 +260,8 @@ async def get_chart_data(  # noqa: C901
                     cached_metrics = cached_form_data_dict.get("metrics", [])
                     cached_groupby = cached_form_data_dict.get("groupby", [])
 
+                _apply_extra_form_data(cached_form_data_dict, 
request.extra_form_data)

Review Comment:
   Already addressed: lines 272-275 propagate adhoc_filters from the merged 
form_data into the query dict before passing to QueryContextFactory.create().



##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -443,6 +466,10 @@ async def get_chart_data(  # noqa: C901
                     for query in query_context_json.get("queries", []):
                         query["row_limit"] = request.limit
 
+                # Merge dashboard native filters into query_context's form_data
+                qc_form_data = query_context_json.setdefault("form_data", {})
+                _apply_extra_form_data(qc_form_data, request.extra_form_data)

Review Comment:
   Good catch — fixed. After merging into form_data, we now propagate 
adhoc_filters into each query in the queries array so dashboard native filters 
are applied during execution regardless of whether the pipeline reads from 
form_data or queries.



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