[
https://issues.apache.org/jira/browse/GROOVY-11915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072819#comment-18072819
]
ASF GitHub Bot commented on GROOVY-11915:
-----------------------------------------
paulk-asert commented on PR #2457:
URL: https://github.com/apache/groovy/pull/2457#issuecomment-4229177474
merged manually
> 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
> Priority: Major
>
> 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)