You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Deneche A. Hakim (JIRA)" <ji...@apache.org> on 2015/06/25 01:40:05 UTC

[jira] [Resolved] (DRILL-3358) CUME_DIST window function provides wrong result when only ORDER BY clause is specified

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

Deneche A. Hakim resolved DRILL-3358.
-------------------------------------
    Resolution: Duplicate

> CUME_DIST window function provides wrong result when only ORDER BY clause is specified
> --------------------------------------------------------------------------------------
>
>                 Key: DRILL-3358
>                 URL: https://issues.apache.org/jira/browse/DRILL-3358
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.1.0
>            Reporter: Abhishek Girish
>            Assignee: Deneche A. Hakim
>              Labels: window_function
>             Fix For: 1.1.0
>
>
> *Drill:*
> {code:sql}
> > SELECT CUME_DIST() OVER (ORDER BY ss.ss_store_sk) FROM store_sales ss ORDER BY 1 LIMIT 20;
> +---------------------+
> |       EXPR$0        |
> +---------------------+
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> | 0.9923989432198661  |
> +---------------------+
> 20 rows selected (17.317 seconds)
> {code}
> *Postgres*
> {code:sql}
> # SELECT CUME_DIST() OVER (ORDER BY ss.ss_store_sk) FROM store_sales ss ORDER BY 1 LIMIT 20;
>      cume_dist    
> -------------------
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
>  0.158622193275665
> (20 rows)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)