Khurram Faraaz created DRILL-3595:
-------------------------------------

             Summary: Wrong results returned by query that uses LEAD window 
function
                 Key: DRILL-3595
                 URL: https://issues.apache.org/jira/browse/DRILL-3595
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Codegen, Execution - Flow
    Affects Versions: 1.2.0
         Environment: private-branch-new-window-funcs
            Reporter: Khurram Faraaz
            Assignee: Chris Westin


Query that uses LEAD window function returns wrong results on developer's 
private branch (new-window-funcs).

Results returned by Drill

{code}
0: jdbc:drill:schema=dfs.tmp> select lead(c1) over w from union_01 window w as 
(partition by c3 order by c1) limit 10;
+---------+
| EXPR$0  |
+---------+
| 878     |
| -150    |
| 402     |
| 402     |
| 402     |
| 402     |
| 402     |
| 160     |
| 160     |
| 160     |
+---------+
10 rows selected (0.349 seconds)
{code}

Results returned by Postgres

{code}
postgres=# select lead(c1) over w from union_01 window w as (partition by c3 
order by c1) limit 10;
 lead 
------
     
     
  402
  402
  402
  402
  402
     
  160
  160
(10 rows)
{code}



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

Reply via email to