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/20 01:19:00 UTC

[jira] [Commented] (DRILL-3327) row_number function returns incorrect result when only order by clause is specified

    [ https://issues.apache.org/jira/browse/DRILL-3327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594086#comment-14594086 ] 

Victoria Markman commented on DRILL-3327:
-----------------------------------------

I will work on a smaller reproduction.

> row_number function returns incorrect result when only order by clause is specified
> -----------------------------------------------------------------------------------
>
>                 Key: DRILL-3327
>                 URL: https://issues.apache.org/jira/browse/DRILL-3327
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.0.0
>            Reporter: Victoria Markman
>            Assignee: Jinfeng Ni
>            Priority: Critical
>         Attachments: j1.tar, row_number_wrong_result.tar
>
>
> Queries returning wrong result:
> {code}
> select c_integer, row_number() over(order by c_integer) from j1 order by 2;
> select c_integer, row_number() over(order by c_integer) from j1 order by 2 desc;
> select c_integer, row_number() over(order by c_integer desc) from j1 order by 2;
> select c_integer, row_number() over(order by c_integer desc) from j1 order by 2;
> select c_integer, row_number() over(order by c_integer nulls first) from j1 order by c_integer nulls last,  row_number() over(order by c_integer nulls first);
> select c_integer, row_number() over(order by c_integer nulls last) from j1 order by c_integer nulls first, row_number() over(order by c_integer nulls last);
> {code}
> In attached tar file (row_number_wrong_result.tar) you will find:
> 1. *.sql - file that contains query
> 2. *.res - expected result (generated from Postgres)
> 3. *.out - result returned by drill



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