hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phabricator (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-4126) remove support for lead/lag UDFs outside of UDAF args
Date Thu, 07 Mar 2013 17:04:14 GMT

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

Phabricator commented on HIVE-4126:
-----------------------------------

ashutoshc has commented on the revision "HIVE-4126 [jira] remove support for lead/lag UDFs
outside of UDAF args".

  Changes look good. But following query in windowing_expressions.q fails
  select p_mfgr, p_retailprice, p_size,
  rank() as r,
   lag(rank(),1) as pr,
  sum(p_retailprice) as s2 over (rows between unbounded preceding and current row),
  sum(p_retailprice) - 5 as s1 over (rows between unbounded preceding and current row)
  from part
  distribute by p_mfgr
  sort by p_retailprice;

  Looks like need to update the query.

INLINE COMMENTS
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:10137 Do we need to update
this comment blocks. Function now does lot less than whats in comment. We probably need to
update comments of other functions as well.

REVISION DETAIL
  https://reviews.facebook.net/D9105

To: JIRA, ashutoshc, hbutani

                
> remove support for lead/lag UDFs outside of UDAF args
> -----------------------------------------------------
>
>                 Key: HIVE-4126
>                 URL: https://issues.apache.org/jira/browse/HIVE-4126
>             Project: Hive
>          Issue Type: Bug
>          Components: PTF-Windowing
>            Reporter: Harish Butani
>            Assignee: Harish Butani
>         Attachments: HIVE-4126.D9105.1.patch
>
>
> Select Expressions such as 
> p_size - lead(p_size,1)
> are currently handled as non aggregation expressions done after all over clauses are
evaluated.
> Once we allow different partitions in a single select list(Jira 4041), these become ambiguous.

> - the equivalent way to do such things is either to use lead/lag UDAFs with expressions
( support added with Jira 4081)
> - stack windowing clauses with inline queries. select lead(r,1).. from (select rank()
as r....)...

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

Mime
View raw message