[ https://issues.apache.org/jira/browse/HIVE-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14010449#comment-14010449 ]
Jason Rosendale commented on HIVE-6950: --------------------------------------- I don't know if my issue is identical to this one or just very closely related, but I can recreate the same error with the following query: {code} select a, left(b,5), count(1) from temp_table group by a, left(b,5) grouping sets ((left(b,5),a)) {code} The error does not occur if I just switch the order of the two elements in the grouping set: {code} select a, left(b,5), count(1) from temp_table group by a, left(b,5) grouping sets ((a,left(b,5))) {code} The error occurs whenever the LEFT function is not the very last element in its grouping set. The error also occurs when I replace LEFT with other functions. > 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 '<EOF>' > line 7:31 extraneous input ')' expecting EOF near '<EOF>' > {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)