StarRocks/starrocks

Support using JSON as GROUP BY

Offen

#62.502 geöffnet am 29.08.2025

 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Java (1.246 Forks)batch import
good first issuetype/enhancement

Repository-Metriken

Stars
 (5.717 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 5h) (1.000 gemergte PRs in 30 T)

Beschreibung

Enhancement

MySQL root@127.1:d1> select event_date from tjson group by event_date;
(1064, 'Getting analyzing error. Detail message: Type (nested) percentile/hll/bitmap/json not support group-by.')

JSON is currently not supported in the GROUP BY clause, but enabling this functionality could be beneficial for certain scenarios.

To implement GROUP BY support for JSON, a stable hash function and comparison function are required. This can be achieved using asymmetric hash mixing techniques, such as XOR, which is already implemented in JsonValue::hash.

Contributor Guide