hughhhh commented on code in PR #42284:
URL: https://github.com/apache/superset/pull/42284#discussion_r3667644393


##########
superset/tasks/export_dashboard_excel.py:
##########
@@ -67,6 +68,12 @@
 # image. Operators can override the set via ``EXCEL_EXPORT_TABLE_VIZ_TYPES``.
 TABLE_VIZ_TYPES = {"table", "pivot_table_v2", "pivot_table"}
 
+# Viz types whose missing query context may be rebuilt from saved form data.
+# Conservative by default: only charts whose data maps faithfully to a single
+# plain query (no post-processing, no multi-query fan-out). Operators can
+# override via ``EXCEL_EXPORT_REBUILD_VIZ_TYPES``.
+REBUILD_VIZ_TYPES = {"table", "big_number_total", "big_number", "pie"}

Review Comment:
   Good point — the viz-type allowlist isn't sufficient on its own. Fixed in 
808ba6f4b4: `_resolve_query_context` now also skips the rebuild (→ re-save 
list) when the form data uses processing the single query can't reproduce — 
`time_compare`, `rolling_type` (ignoring the literal `"None"`), 
`resample_rule`, or `aggregation == "raw"`. Added a parametrized regression 
test covering all four (including `time_compare`).



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