mirror of
https://github.com/apache/superset.git
synced 2026-05-24 09:15:19 +00:00
When sort_by_metric is true, buildQuery unconditionally appended a secondary ORDER BY series ASC alongside the metric sort. On Druid, any multi-column ORDER BY prevents the native TopN query optimization, forcing a full GroupBy scan that can cause dramatic slowdowns and timeouts on high-cardinality dimensions. Make the series sort mutually exclusive with sort_by_metric, and add test coverage for both sort behaviors. Fixes #39072
2.4 KiB
2.4 KiB