mirror of
https://github.com/apache/superset.git
synced 2026-08-04 04:52:32 +00:00
order_by_cols is a raw-mode-only control (resetOnHide: false), so an aggregate chart can carry a stale value. The form-data query-context rebuild read it in every mode, which could order an aggregate export by stale columns and return a different top-N than the chart shows. Gate it behind is_raw_query_mode so aggregate mode falls back to the metric-based ordering, mirroring the frontend Table buildQuery. Also add frontend-drift pointers naming the mirrored buildQuery / extractQueryFields / processFilters sources, and a regression test for an aggregate table with a stale order_by_cols. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>