You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2013/03/21 19:59:15 UTC
[jira] [Commented] (HIVE-4214) OVER accepts general expression
instead of just function
[ https://issues.apache.org/jira/browse/HIVE-4214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13609307#comment-13609307 ]
Alan Gates commented on HIVE-4214:
----------------------------------
When the query is re-written to properly put the / 10.0 after the OVER, it fails with:
{code}
NoViableAltException(15@[129:7: ( ( ( KW_AS )? identifier ) | ( KW_AS LPAREN identifier ( COMMA identifier )* RPAREN ) )?])
{code}
> OVER accepts general expression instead of just function
> --------------------------------------------------------
>
> Key: HIVE-4214
> URL: https://issues.apache.org/jira/browse/HIVE-4214
> Project: Hive
> Issue Type: Bug
> Components: PTF-Windowing
> Affects Versions: 0.11.0
> Reporter: Alan Gates
>
> The query:
> select s, i, avg(d) / 10.0 over (partition by s order by i) from over100k;
> runs (and produces meaningless output).
> Over should not allow the arithmetic expression. Only a UDAF or PTF function should be valid there. The correct way to write this query should be
> select s, i, avg(d) over (partition by s order by i) / 10. 0 from over100k;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira