Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91EA1175F0 for ; Thu, 22 Jan 2015 00:19:35 +0000 (UTC) Received: (qmail 16734 invoked by uid 500); 22 Jan 2015 00:19:35 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 16660 invoked by uid 500); 22 Jan 2015 00:19:35 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 16649 invoked by uid 500); 22 Jan 2015 00:19:35 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 16646 invoked by uid 99); 22 Jan 2015 00:19:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jan 2015 00:19:35 +0000 Date: Thu, 22 Jan 2015 00:19:35 +0000 (UTC) From: "Navis (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-9412) Window clause ROW BETWEEN for PRECEDING does not work 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/HIVE-9412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Navis updated HIVE-9412: ------------------------ Attachment: HIVE-9412.3.patch.txt > Window clause ROW BETWEEN for PRECEDING does not work > ----------------------------------------------------- > > Key: HIVE-9412 > URL: https://issues.apache.org/jira/browse/HIVE-9412 > Project: Hive > Issue Type: Bug > Components: Parser > Affects Versions: 0.14.0, 0.13.1 > Environment: CDH 5.3 or HDP 2.2 > Reporter: Will Du > Assignee: Navis > Attachments: HIVE-9412.1.patch.txt, HIVE-9412.2.patch.txt, HIVE-9412.3.patch.txt > > > When window clause with ROWS is used between two proper PRECEDING boundaries, Hive reports syntax errors as following examples. > --For example 1 > SELECT name, dept_num, salary, > MAX(salary) OVER (PARTITION BY dept_num ORDER BY > name ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING) win4_alter > FROM employee_contract; > Error: Error while compiling statement: FAILED: SemanticException Failed to breakup Windowing invocations into Groups. At least 1 group must only depend on input columns. Also check for circular dependencies. > Underlying error: Window range invalid, start boundary is greater than end boundary: window(start=range(2 PRECEDING), end=range(1 PRECEDING)) (state=42000,code=40000) > --For example 2 > SELECT name, dept_num, salary, > MAX(salary) OVER (PARTITION BY dept_num ORDER BY > name ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) win1 > FROM employee_contract; > Error: Error while compiling statement: FAILED: SemanticException End of a WindowFrame cannot be UNBOUNDED PRECEDING (state=42000,code=40000) -- This message was sent by Atlassian JIRA (v6.3.4#6332)