You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chan (Jira)" <ji...@apache.org> on 2019/09/24 10:24:00 UTC

[jira] [Resolved] (CALCITE-3159) Distinct can be removed for MIN/MAX/BIT_OR/BIT_AND aggregate functions

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

Danny Chan resolved CALCITE-3159.
---------------------------------
      Assignee: Danny Chan  (was: Julian Hyde)
    Resolution: Fixed

Fixed in [3abb974|https://github.com/apache/calcite/commit/3abb974588194e2e531aa43daa79c4dfd18ef25f], thanks for your PR, [~x1q1j1] !

> Distinct can be removed for MIN/MAX/BIT_OR/BIT_AND aggregate functions
> ----------------------------------------------------------------------
>
>                 Key: CALCITE-3159
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3159
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Haisheng Yuan
>            Assignee: Danny Chan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> For the following query:
> {code:java}
> select a, min(distinct b), bit_or(distinct c) from foo group by a;
> {code}
> Currently Calcite still preserve the distinct for these aggregate functions, but DISTINCT is not meaningful with MIN/MAX and is available for ISO compatibility only. We can safely remove distinct and get more optimization opportunities.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)