Commit Graph

5 Commits

Author SHA1 Message Date
Brian Donovan
427d94b4bd fix(chart): add independent sort_by_series control for word cloud
Make sort_by_metric and sort_by_series independent controls instead of
the previous behavior where series sort was unconditionally appended
alongside the metric sort. This allows users to choose metric-only
sorting (enabling Druid TopN optimization) while optionally adding a
secondary series sort for tie-breaking.

Changes:
- buildQuery.ts: sort_by_metric and sort_by_series are now independent
- controlPanel.tsx: add sort_by_series checkbox (default: false)
- buildQuery.test.ts: cover all four sort combinations
- DB migration: set sort_by_series=true for existing word_cloud charts
  to preserve backward compatibility

Fixes #39072
2026-04-13 12:47:13 -07:00
Brian Donovan
d56d31b252 fix(chart): word cloud secondary sort prevents Druid TopN optimization when sort_by_metric enabled
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
2026-04-13 12:24:35 -07:00
Đỗ Trọng Hải
563d9f1a3f chore(lint): migrate Jest lint rules from eslint to oxlint (#37787)
Signed-off-by: hainenber <dotronghai96@gmail.com>
2026-02-08 16:44:42 +07:00
Michael S. Molina
93ba8e16c3 refactor: Creates the VizType enum (#31193) 2024-11-29 10:05:02 -03:00
Michael S. Molina
85b66946ed refactor: Remove dead code from the Word Cloud plugin (#29594) 2024-07-19 10:37:40 -03:00