[ 
https://issues.apache.org/jira/browse/HIVE-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080569#comment-14080569
 ] 

Lefty Leverenz commented on HIVE-4934:
--------------------------------------

Thanks [~lars_francke].  Was there a reason for the line break that put 
"SELECT" and "a," on separate lines?  (I removed it to match all the other 
examples, but you can restore it if it has a purpose.)

{code}
SELECT
 a,
 COUNT(b) OVER (PARTITION BY c),
 SUM(b) OVER (PARTITION BY c)
FROM T;
{code}

Also thanks for changing the formatting of code samples.

* [PARTITION BY with partitioning, ORDER BY, and window specification | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics#LanguageManualWindowingAndAnalytics-PARTITIONBYwithpartitioning,ORDERBY,andwindowspecification]

> Improve documentation of OVER clause
> ------------------------------------
>
>                 Key: HIVE-4934
>                 URL: https://issues.apache.org/jira/browse/HIVE-4934
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Lars Francke
>            Assignee: Lars Francke
>            Priority: Minor
>
> {code}
> CREATE TABLE test (foo INT);
> SELECT ntile(10), foo OVER (PARTITION BY foo) FROM test;
> FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: 
> Only COMPLETE mode supported for NTile function
> SELECT foo, ntile(10) OVER (PARTITION BY foo) FROM test;
> ...works...
> {code}
> I'm not sure if that is a bug or necessary. Either way the error message is 
> not helpful as it's not documented anywhere what {{COMPLETE}} mode is. A 
> cursory glance at the code didn't help me either.
> Edit: It is not a bug, it wasn't clear to me that the OVER clause only 
> applies to the directly preceding function.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to