Paul King created GROOVY-11915:
----------------------------------
Summary: GINQ: Add groupby...into with first-class GroupResult type
Key: GROOVY-11915
URL: https://issues.apache.org/jira/browse/GROOVY-11915
Project: Groovy
Issue Type: Improvement
Reporter: Paul King
Assignee: Paul King
For GINQ, introduce an optional "into <alias>" clause for groupby that binds a
GroupResult<K, T> variable (extending Queryable<T> with a key property).
When used, this would replace the current magic aggregate function rewriting
with real method calls on a first-class type, enabling composable group queries
(e.g. {{g.where(...).toList()}}), simplifying the correctVars logic in
GinqAstWalker, and making the backend Queryable API directly usable for grouped
queries.
The existing groupby syntax (without "into") would continue to work unchanged.
If we ever provided a GINQ SQL provider, GroupResult maps cleanly to SQL GROUP
BY + aggregate functions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)