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 BC579182D2 for ; Wed, 24 Feb 2016 17:23:16 +0000 (UTC) Received: (qmail 81689 invoked by uid 500); 24 Feb 2016 17:22:18 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 81631 invoked by uid 500); 24 Feb 2016 17:22:18 -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 81589 invoked by uid 99); 24 Feb 2016 17:22:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 17:22:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 47FF42C1F5B for ; Wed, 24 Feb 2016 17:22:18 +0000 (UTC) Date: Wed, 24 Feb 2016 17:22:18 +0000 (UTC) From: "Deneche A. Hakim (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4431) NTILE function should NOT allow the use of frame clause in its window definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-4431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Deneche A. Hakim updated DRILL-4431: ------------------------------------ Labels: window_function (was: ) > NTILE function should NOT allow the use of frame clause in its window definition > -------------------------------------------------------------------------------- > > Key: DRILL-4431 > URL: https://issues.apache.org/jira/browse/DRILL-4431 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.6.0 > Reporter: Khurram Faraaz > Labels: window_function > Fix For: 1.6.0 > > > NTILE function should not allow the use of frame clause in its window definition, the below query should return and error and say the operation is not supported. > Drill 1.6.0, commit ID: 6d5f4983 > The SQL spec says NTILE should not allow use of frame clause. > {noformat} > From the SQL SPEC on page 220 > ISO/IEC 9075-2:2011(E) > 6.10 > 7) > > If , , or ROW_NUMBER is specified, then: > a) If , , RANK or DENSE_RANK is specified, then the window > ordering clause WOC of WDX shall be present. > b) The window framing clause of WDX shall not be present. > {noformat} > {noformat} > 0: jdbc:drill:schema=dfs.tmp> select NTILE(3) OVER(PARTITION BY CAST(columns[0] as integer) ORDER BY cast(columns[0] as integer) ROWS UNBOUNDED PRECEDING) from dfs.tmp.`t_alltype.csv`; > +---------+ > | EXPR$0 | > +---------+ > | 1 | > | 1 | > | 1 | > ... > ... > | 1 | > | 1 | > | 1 | > +--------+ > 145 rows selected (0.322 seconds) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)