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 55B6217436 for ; Tue, 15 Sep 2015 18:25:46 +0000 (UTC) Received: (qmail 10156 invoked by uid 500); 15 Sep 2015 18:25:46 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 9900 invoked by uid 500); 15 Sep 2015 18:25:46 -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 9887 invoked by uid 99); 15 Sep 2015 18:25:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2015 18:25:45 +0000 Date: Tue, 15 Sep 2015 18:25:45 +0000 (UTC) From: "Victoria Markman (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3189) Disable ALLOW PARTIAL/DISALLOW PARTIAL in window function grammar 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-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14745884#comment-14745884 ] Victoria Markman commented on DRILL-3189: ----------------------------------------- Since we decided not to support "ROWS" syntax for now, it's not possible to verify this fix. > Disable ALLOW PARTIAL/DISALLOW PARTIAL in window function grammar > ----------------------------------------------------------------- > > Key: DRILL-3189 > URL: https://issues.apache.org/jira/browse/DRILL-3189 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.0.0 > Reporter: Victoria Markman > Assignee: Sean Hsuan-Yi Chu > Priority: Critical > Labels: window_function > Fix For: 1.2.0 > > > It does not seem to be implemented on the drill side. Looks like Calcite specific grammar. Don't see it SQL Standard. > Looks like wrong result: > {code} > 0: jdbc:drill:schema=dfs> select a2, sum(a2) over(partition by a2 order by a2 rows between 1 preceding and 1 following disallow partial) from t2 order by a2; > +-----+---------+ > | a2 | EXPR$1 | > +-----+---------+ > | 0 | null | > | 1 | null | > | 2 | 6 | > | 2 | 6 | > | 2 | 6 | > | 3 | null | > | 4 | null | > | 5 | null | > | 6 | null | > | 7 | 14 | > | 7 | 14 | > | 8 | null | > | 9 | null | > +-----+---------+ > 13 rows selected (0.213 seconds) > {code} > {code} > 0: jdbc:drill:schema=dfs> select a2, sum(a2) over(partition by a2 order by a2 rows between 1 preceding and 1 following allow partial) from t2 order by a2; > +-----+---------+ > | a2 | EXPR$1 | > +-----+---------+ > | 0 | 0 | > | 1 | 1 | > | 2 | 6 | > | 2 | 6 | > | 2 | 6 | > | 3 | 3 | > | 4 | 4 | > | 5 | 5 | > | 6 | 6 | > | 7 | 14 | > | 7 | 14 | > | 8 | 8 | > | 9 | 9 | > +-----+---------+ > 13 rows selected (0.208 seconds) > {code} > {code} > 0: jdbc:drill:schema=dfs> select a2, sum(a2) over(partition by a2 order by a2 disallow partial) from t2 order by a2; > Error: PARSE ERROR: From line 1, column 53 to line 1, column 68: Cannot use DISALLOW PARTIAL with window based on RANGE > [Error Id: 984c4b81-9eb0-401d-b36a-9580640b4a78 on atsqa4-133.qa.lab:31010] (state=,code=0) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)