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 24D44114F3 for ; Tue, 22 Apr 2014 20:24:31 +0000 (UTC) Received: (qmail 92089 invoked by uid 500); 22 Apr 2014 20:24:16 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 92032 invoked by uid 500); 22 Apr 2014 20:24:15 -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 92017 invoked by uid 500); 22 Apr 2014 20:24:15 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 92011 invoked by uid 99); 22 Apr 2014 20:24:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 20:24:15 +0000 Date: Tue, 22 Apr 2014 20:24:15 +0000 (UTC) From: "Harish Butani (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-6950) Parsing Error in GROUPING SETS 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-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13977346#comment-13977346 ] Harish Butani commented on HIVE-6950: ------------------------------------- Yes there s an ambiguity in the grammar. The dfa for the groupingSetExpression chooses to interpret the '((tab1.a, tab1.b))' as '((tab1.a), (tab1.b))' and so it complains that the ')' is missing. In the case of '((a, tab1.b))' the dfa chooses the right path. The fix is to add Syntactic predicate for this rule. > Parsing Error in GROUPING SETS > ------------------------------ > > Key: HIVE-6950 > URL: https://issues.apache.org/jira/browse/HIVE-6950 > Project: Hive > Issue Type: Bug > Reporter: Rohit Agarwal > > The following query: > {code} > SELECT tab1.a, > tab1.b, > SUM(tab1.c) > FROM tab1 > GROUP BY tab1.a, > tab1.b > GROUPING SETS ((tab1.a, tab1.b)) > {code} > results in the following error: > {code} > ParseException line 7:22 missing ) at ',' near '' > line 7:31 extraneous input ')' expecting EOF near '' > {code} > Changing the query to: > {code} > SELECT tab1.a, > tab1.b, > SUM(tab1.c) > FROM tab1 > GROUP BY tab1.a, > tab1.b > GROUPING SETS ((a, tab1.b)) > {code} > makes it work. -- This message was sent by Atlassian JIRA (v6.2#6252)