You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/06/30 01:14:04 UTC
[jira] [Closed] (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 ]
Victoria Markman closed DRILL-3358.
-----------------------------------
> 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)