[ https://issues.apache.org/jira/browse/DRILL-3409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Victoria Markman updated DRILL-3409: ------------------------------------ Labels: window_function (was: ) > Specifying default frame explicitly results in an error > ------------------------------------------------------- > > Key: DRILL-3409 > URL: https://issues.apache.org/jira/browse/DRILL-3409 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.1.0 > Reporter: Victoria Markman > Assignee: Jinfeng Ni > Labels: window_function > > If I spell out default frame, I get an error: > {code} > 0: jdbc:drill:schema=dfs> select c_bigint, min(c_double) over(partition by > c_bigint order by c_date, c_time nulls first range between unbounded > preceding and current row) from j9; > Error: PARSE ERROR: From line 1, column 95 to line 1, column 99: RANGE clause > cannot be used with compound ORDER BY clause > [Error Id: fe955fc0-bc0f-4588-bdc2-24defdc9390c on atsqa4-133.qa.lab:31010] > (state=,code=0) > {code} > If I don't specify explicitly "default" frame as in the example above: query > parses and returns the same result as Postgres: > {code} > 0: jdbc:drill:schema=dfs> explain plan for select c_bigint, min(c_double) > over(partition by c_bigint order by c_date, c_time nulls first) from j9; > 00-00 Screen > 00-01 ProjectAllowDup(c_bigint=[$0], EXPR$1=[$1]) > 00-02 Project(c_bigint=[$1], w0$o0=[$5]) > 00-03 Window(window#0=[window(partition {1} order by [3, 4 > ASC-nulls-first] range between UNBOUNDED PRECEDING and CURRENT ROW aggs > [MIN($2)])]) > 00-04 SelectionVectorRemover > 00-05 Sort(sort0=[$1], sort1=[$3], sort2=[$4], dir0=[ASC], > dir1=[ASC], dir2=[ASC-nulls-first]) > 00-06 Project(T32¦¦*=[$0], c_bigint=[$1], c_double=[$2], > c_date=[$3], c_time=[$4]) > 00-07 Scan(groupscan=[ParquetGroupScan > [entries=[ReadEntryWithPath [path=maprfs:///drill/testdata/subqueries/j9]], > selectionRoot=/drill/testdata/subqueries/j9, numFiles=1, columns=[`*`]]]) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)