You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Deneche A. Hakim (JIRA)" <ji...@apache.org> on 2014/12/10 23:16:12 UTC
[jira] [Commented] (DRILL-1487) Drill window functions return wrong
results
[ https://issues.apache.org/jira/browse/DRILL-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14241843#comment-14241843 ]
Deneche A. Hakim commented on DRILL-1487:
-----------------------------------------
starting from Drill 0.7.0 the following query:
{code}
SELECT employee_id,position_id, salary, avg(salary) OVER (PARTITION BY position_id order by position_id) FROM cp.`employee.json`;
{code}
throws an exception:
{code}
Query failed: Query failed: Failure while running fragment., Attempted to close accountor with 6 buffer(s) still allocatedfor QueryId: 2b773a53-47a0-ef34-a159-baeaee9bf1d5, MajorFragmentId: 0, MinorFragmentId: 0.
{code}
> Drill window functions return wrong results
> -------------------------------------------
>
> Key: DRILL-1487
> URL: https://issues.apache.org/jira/browse/DRILL-1487
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 0.6.0
> Reporter: Neeraja
> Assignee: Deneche A. Hakim
> Fix For: 0.8.0
>
>
> Executing the following window function with the requirement to see how a given employee salary would compare to the avg(salary) in his/her position.
> Query executes fine however returns wrong results(expect the avg(salary) to stay same for a given window (i.e position id)
> 0: jdbc:drill:zk=local> SELECT employee_id,position_id, salary, avg(salary) OVER (PARTITION BY position_id order by position_id) FROM cp.`employee.json` order by employee_id;
> +-------------+-------------+------------+------------+
> | employee_id | position_id | salary | EXPR$3 |
> +-------------+-------------+------------+------------+
> | 1 | 1 | 80000.0 | 80000.0 |
> | 2 | 2 | 40000.0 | 37500.0 |
> | 4 | 2 | 40000.0 | 38333.333333333336 |
> | 5 | 2 | 35000.0 | 35000.0 |
> | 6 | 3 | 25000.0 | 25000.0 |
> | 7 | 4 | 15000.0 | 15000.0 |
> | 8 | 11 | 10000.0 | 14333.333333333334 |
> | 9 | 11 | 17000.0 | 17000.0 |
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)