Build the grouped breakdown + whole-result summary for a definition over a
row set. Returns {} when no grouping is configured, so the result shape is
unchanged for plain flat lists. Exported so federated callers can re-derive
groups/summary after merging rows from several models.
Multi-criteria grouping (issue #1790): with several group columns the
returned groups is a FLAT pre-order list — each parent group followed by
its subgroups, level/path carrying the nesting. Every group carries its
own count (the Count aggregate) and per-column sums.
Build the grouped breakdown + whole-result summary for a definition over a row set. Returns
{}when no grouping is configured, so the result shape is unchanged for plain flat lists. Exported so federated callers can re-derive groups/summary after merging rows from several models.Multi-criteria grouping (issue #1790): with several group columns the returned
groupsis a FLAT pre-order list — each parent group followed by its subgroups,level/pathcarrying the nesting. Every group carries its owncount(the Count aggregate) and per-column sums.