drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-3358) CUME_DIST window function provides wrong result when only ORDER BY clause is specified
Date Wed, 24 Jun 2015 23:40:05 GMT

     [ 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)

Mime
View raw message