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

Khurram Faraaz commented on DRILL-3218:
---------------------------------------

Similar query compiles and executed on Postgres.

{code}
postgres=# select max(id) over (partition by dt order by tmstmp) from time_tbl;
 max 
-----
  11
  14
 810
 180
 594
  25
  25
 125
   5
(9 rows)

postgres=# select * from time_tbl;
 id  |         tmstmp          |     dt     
-----+-------------------------+------------
 594 | 2015-01-04 06:41:42.869 | 1991-01-03
  11 | 2015-03-04 06:41:42.87  | 1956-02-07
  14 | 2015-02-04 06:41:42.87  | 1956-03-07
 180 | 2015-01-04 06:41:42.87  | 1956-08-07
 810 | 2015-04-04 06:41:42.87  | 1956-07-07
  25 | 2015-07-04 06:41:42.171 | 2011-06-13
  25 | 2015-08-04 06:41:42.371 | 2011-01-13
   5 | 2015-06-04 06:41:42.871 | 2011-09-13
 125 | 2015-04-04 06:41:42.871 | 2011-07-13
(9 rows)
{code}

> Window function usage throws CompileException
> ---------------------------------------------
>
>                 Key: DRILL-3218
>                 URL: https://issues.apache.org/jira/browse/DRILL-3218
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.0.0
>         Environment: faec150598840c40827e6493992d81209aa936da
>            Reporter: Khurram Faraaz
>            Assignee: Deneche A. Hakim
>              Labels: window_function
>             Fix For: 1.1.0
>
>         Attachments: drillbit_DRILL_3218.log
>
>
> PARTITION BY date ORDER BY timestamp
> {code}
> 0: jdbc:drill:schema=dfs.tmp> SELECT MAX(columns[0]) OVER (PARTITION BY 
> columns[6] ORDER BY columns[4]) FROM `allTypData2.csv`;
> Error: SYSTEM ERROR: org.codehaus.commons.compiler.CompileException: Line 
> 330, Column 31: Unknown variable or type "incoming"
> Fragment 0:0
> [Error Id: 285af8f1-ddb4-4d3e-a2d7-bfaef20df5e0 on centos-02.qa.lab:31010] 
> (state=,code=0)
> {code}
> I will add more details in a bit.



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

Reply via email to