You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/06/09 17:12:00 UTC

[jira] [Commented] (CALCITE-1473) Ordered-set and hypothetical-set aggregate functions

    [ https://issues.apache.org/jira/browse/CALCITE-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17360225#comment-17360225 ] 

Julian Hyde commented on CALCITE-1473:
--------------------------------------

CALCITE-4644 is a sub-task dealing with {{PERCENTILE_CONT}} and {{PERCENTILE_DISC}}.

{{MODE}} was mentioned in CALCITE-4006, but now I've closed that case as a duplicate, falls back into this bucket.

> Ordered-set and hypothetical-set aggregate functions
> ----------------------------------------------------
>
>                 Key: CALCITE-1473
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1473
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Priority: Major
>
> Support ordered-set and hypothetical-set aggregate functions. Both have a WITHIN GROUP clause. These are supported by Oracle, PostgreSQL, Microsoft SQL Server.
> Examples of ordered-set aggregate functions are {{mode}}, {{percentile_cont}}, {{percentile_disc}}. See [PostgreSQL doc|https://www.postgresql.org/docs/9.5/static/functions-aggregate.html#FUNCTIONS-ORDEREDSET-TABLE].
> Examples of hypothetical-set aggregate functions are {{rank}}, {{dense_rank}}, {{percent_rank}}, {{cume_dist}}. See [PostgreSQL doc|https://www.postgresql.org/docs/9.5/static/functions-aggregate.html#FUNCTIONS-HYPOTHETICAL-TABLE].
> The SQL standard says (in section 4.16.4 Aggregate Functions):
> {quote}The hypothetical set functions are related to the window functions RANK, DENSE_RANK, PERCENT_RANK, and CUME_DIST, and use the same names, though with a different syntax.{quote}



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