mirror of
https://github.com/apache/superset.git
synced 2026-07-27 17:12:36 +00:00
_bisect_row_limit already trims statements[*].data.rows in lockstep with the top-level rows field to keep the response under the token limit, but left each statement's row_count pointing at the pre-truncation count, so a truncated execute_sql response could claim more rows than statements[*].data actually contains. Track the statement dicts (not just their row lists) and update row_count alongside data.rows. Also log a full traceback (logger.exception) instead of a plain warning when data-query truncation hits an unexpected error, so a real bug isn't indistinguishable from routine size-limit enforcement. Adds regression tests for: total_rows surviving truncation distinct from row_count, the no-recognised-row-field fallback path, and the oversized-excel-export hard-failure path.