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

Ashutosh Chauhan commented on HIVE-4192:
----------------------------------------

I see. We can possibly do the same, ie silently drop the window frame if 
specified. But to me throwing exception is better. Consider user says
{noformat}
select i, lead(s) over (partition by bin order by d desc rows between current 
row and 10 following) from over100k;
{noformat}
and than expect he will get difference between current row and 10th row 
following current one for lead (s) column. This is illegal, but since we are 
silently dropping window frame we won't notice this and return results to him, 
which will be different than his expectations. Throwing exception at compile 
time (ie current behavior) seems best alternative for such scenarios.
                
> Use of LEAD in an OVER clauses causes the query to fail
> -------------------------------------------------------
>
>                 Key: HIVE-4192
>                 URL: https://issues.apache.org/jira/browse/HIVE-4192
>             Project: Hive
>          Issue Type: Bug
>          Components: PTF-Windowing
>    Affects Versions: 0.11.0
>            Reporter: Alan Gates
>
> Running a query like:
> {code}
> select i, lead(s) over (partition by bin order by d desc 
>                         rows between current row and 1 following) 
> from over100k;
> {code}
> gives an error:
> {code}
> FAILED: SemanticException Function lead((TOK_TABLE_OR_COL s)) 
> org.apache.hadoop.hive.ql.parse.WindowingSpec$WindowSpec@13e15f7 as _wcol0 
> doesn't support windowing
> {code}

--
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

Reply via email to