You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Rui Wang (Jira)" <ji...@apache.org> on 2020/01/16 20:06:00 UTC

[jira] [Updated] (CALCITE-3743) Support PERCENT_RANK window aggregate function

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

Rui Wang updated CALCITE-3743:
------------------------------
    Description: 
It seems like Calcite does not have an implementation of PERCENT_RANK: see the list of implemented window aggregate function: https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java#L635


Did a quick check and MySQL, Postgresql, Oracle, BigQuery all support it. The definition is consistent: 


{code:java}
the function returns relative rank of the current row: (rank - 1) / (total partition rows - 1)
{code}


The return value should be double.


  was:
It seems like Calcite does not have an implementation of PERCENT_RANK: see the list of implemented window aggregate function: https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java#L635


Did a quick check and MySQL, Postgresql, Oracle, BigQuery all support it. The definition is consistent: 

the function returns relative rank of the current row: (rank - 1) / (total partition rows - 1)

The return value should be double.



> Support PERCENT_RANK window aggregate function
> ----------------------------------------------
>
>                 Key: CALCITE-3743
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3743
>             Project: Calcite
>          Issue Type: Task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>
> It seems like Calcite does not have an implementation of PERCENT_RANK: see the list of implemented window aggregate function: https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java#L635
> Did a quick check and MySQL, Postgresql, Oracle, BigQuery all support it. The definition is consistent: 
> {code:java}
> the function returns relative rank of the current row: (rank - 1) / (total partition rows - 1)
> {code}
> The return value should be double.



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