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

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

MAX over timestamp and date works on Postgres 9.3

{code}
postgres=# select max(tmstmp) over (partition by dt order by tmstmp) from 
time_tbl;
           max           
-------------------------
 2015-03-04 06:41:42.87
 2015-02-04 06:41:42.87
 2015-04-04 06:41:42.87
 2015-01-04 06:41:42.87
 2015-01-04 06:41:42.869
 2015-08-04 06:41:42.371
 2015-07-04 06:41:42.171
 2015-04-04 06:41:42.871
 2015-06-04 06:41:42.871
(9 rows)
{code}

{code}
postgres=# select max(dt) over (partition by dt order by tmstmp) from time_tbl;
    max     
------------
 1956-02-07
 1956-03-07
 1956-07-07
 1956-08-07
 1991-01-03
 2011-01-13
 2011-06-13
 2011-07-13
 2011-09-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