[ 
https://issues.apache.org/jira/browse/CALCITE-7189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhen Chen resolved CALCITE-7189.
--------------------------------
    Fix Version/s: 1.41.0
         Assignee: Zhen Chen
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/6211a95aa15b3a023db21751f6cd748619fc310a
Thanks for the review [~mbudiu][~duanzhengqiang]

> Support MySQL-style non-standard GROUP BY
> -----------------------------------------
>
>                 Key: CALCITE-7189
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7189
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Zhen Chen
>            Assignee: Zhen Chen
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.41.0
>
>
> MySQL allows queries like SELECT a, b FROM t GROUP BY a; when 
> ONLY_FULL_GROUP_BY is disabled, where columns in the SELECT list are not 
> included in the GROUP BY clause or an aggregate function. In this loose mode, 
> MySQL returns any value of b for each group.
> We can add an option to Calcite to support MySQL’s non-standard GROUP BY mode 
> (like disabling ONLY_FULL_GROUP_BY), allowing non-aggregated columns in 
> SELECT that are not present in GROUP BY.
> Example:
> {code:sql}
> SELECT a, b FROM t GROUP BY a;
> -- Should return one arbitrary 'b' value per group, as MySQL does in loose 
> mode.
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to