Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C46E18AC6 for ; Thu, 2 Jul 2015 18:25:05 +0000 (UTC) Received: (qmail 85739 invoked by uid 500); 2 Jul 2015 18:25:05 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 85709 invoked by uid 500); 2 Jul 2015 18:25:05 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 85699 invoked by uid 99); 2 Jul 2015 18:25:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 18:25:05 +0000 Date: Thu, 2 Jul 2015 18:25:05 +0000 (UTC) From: "Jinfeng Ni (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-3409) Specifying default frame explicitly results in an error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3409?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jinfeng Ni updated DRILL-3409: ------------------------------ Assignee: Sean Hsuan-Yi Chu (was: Jinfeng Ni) > 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: Sean Hsuan-Yi Chu > Labels: window_function > Fix For: 1.2.0 > > > If I spell out default frame, I get an error: > {code} > 0: jdbc:drill:schema=3Ddfs> select c_bigint, min(c_double) over(partition= by c_bigint order by c_date, c_time nulls first range between unbounded pr= eceding and current row) from j9; > Error: PARSE ERROR: From line 1, column 95 to line 1, column 99: RANGE cl= ause cannot be used with compound ORDER BY clause > [Error Id: fe955fc0-bc0f-4588-bdc2-24defdc9390c on atsqa4-133.qa.lab:3101= 0] (state=3D,code=3D0) > {code} > If I don't specify explicitly "default" frame as in the example above: qu= ery parses and returns the same result as Postgres: > {code} > 0: jdbc:drill:schema=3Ddfs> explain plan for select c_bigint, min(c_doubl= e) over(partition by c_bigint order by c_date, c_time nulls first) from j9; > 00-00 Screen > 00-01 ProjectAllowDup(c_bigint=3D[$0], EXPR$1=3D[$1]) > 00-02 Project(c_bigint=3D[$1], w0$o0=3D[$5]) > 00-03 Window(window#0=3D[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=3D[$1], sort1=3D[$3], sort2=3D[$4], dir0=3D= [ASC], dir1=3D[ASC], dir2=3D[ASC-nulls-first]) > 00-06 Project(T32=C2=A6=C2=A6*=3D[$0], c_bigint=3D[$1], c_= double=3D[$2], c_date=3D[$3], c_time=3D[$4]) > 00-07 Scan(groupscan=3D[ParquetGroupScan [entries=3D[Rea= dEntryWithPath [path=3Dmaprfs:///drill/testdata/subqueries/j9]], selectionR= oot=3D/drill/testdata/subqueries/j9, numFiles=3D1, columns=3D[`*`]]]) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)