[
https://issues.apache.org/jira/browse/HIVE-14871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585432#comment-16585432
]
Makoto commented on HIVE-14871:
-------------------------------
My customers tried to connect to Hive with SQL created by SPSS, but the same
phenomenon occurred.
Is this a bug? Specification?
> Window PARTITION BY clause throw "ParseException line ?:? missing ) at '?'
> near"
> --------------------------------------------------------------------------------
>
> Key: HIVE-14871
> URL: https://issues.apache.org/jira/browse/HIVE-14871
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 2.1.0
> Reporter: Sahil Takiar
> Priority: Major
>
> Queries such as:
> {code}
> SELECT
> LEAD(True, 54) OVER (PARTITION BY (a1.smallint_col_18) /
> (a1.decimal0101_col_25)) AS boolean_col
> FROM table_10 a1;
> {code}
> throw the exception:
> {code}
> Error: Error while compiling statement: FAILED: ParseException line 2:55
> missing ) at '/' near ')'
> line 2:80 missing EOF at ')' near ')' (state=42000,code=40000)
> {code}
> While the following queries succeed:
> {code}
> SELECT
> LEAD(True, 54) OVER (PARTITION BY (a1.smallint_col_18 /
> a1.decimal0101_col_25)) AS boolean_col
> FROM table_10 a1;
> {code}
> {code}
> SELECT
> LEAD(True, 54) OVER (PARTITION BY (a1.smallint_col_18 /
> a1.decimal0101_col_25) ORDER BY (a1.smallint_col_18) /
> (a1.decimal0101_col_25) DESC) AS boolean_col
> FROM table_10 a1;
> {code}
> Seems to be a Hive bug, seems to be related to the extra parenthesis around
> the a1.smallint_col_18. Hive probably thinks that whatever is inside the ()
> contains the entire clause for PARTITION BY and it fails to parse anything
> after that.
> My guess is that there is an issue with the Antlr code for the PARTITION BY
> clause.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)