[
https://issues.apache.org/jira/browse/CALCITE-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949326#comment-15949326
]
Julian Hyde commented on CALCITE-1473:
--------------------------------------
[~rajeshbabu], Thanks. It's difficult to get the results right, so I suggest
that you run some queries on Postgres and paste the results into a .iq file,
and make sure we get the same. Note that agg.iq does {{!use post}}, which via
[this
code|https://github.com/apache/calcite/blob/0d996daf5df17fb9b05d62fb143f3478bbaa3c80/core/src/test/java/org/apache/calcite/test/CalciteAssert.java#L724]
uses an emp/dept/emps schema that can easily be created in Postgres.
> 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
> Assignee: Julian Hyde
>
> 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
(v6.3.15#6346)