EnxDev commented on code in PR #45250:
URL: https://github.com/apache/superset/pull/45250#discussion_r4292057504
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -766,6 +773,15 @@ async def _get_chart_data( # noqa: C901
await ctx.debug(
"Built query_context from cached form_data (unsaved state)"
)
+ # Cached (unsaved) form_data has no query_context of its own,
+ # so this always goes through the same buildQuery-skipping
+ # fallback as the no-saved-query_context case below.
+ query_context_accuracy_warning = (
+ "Querying unsaved form_data (form_data_key), which has no "
+ "query_context. Data may not match the chart visualization
"
+ "exactly."
+ )
+ await ctx.warning(query_context_accuracy_warning)
Review Comment:
This covers a `form_data_key` on a saved chart, but a `form_data_key` with
no identifier returns early at line 516 into `_query_from_form_data`. That path
uses the same `build_query_context_from_form_data` and still only says "This is
an unsaved chart queried from cached form_data." (line 1457), and its CSV/Excel
calls at 1430 and 1434 don't get the warning either.
So an unsaved big_number with `compare_lag` straight from an Explore session
still reads as exact. Could that path set the same message and pass it through,
with a test next to the chart 206 one?
--
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]