Re: Lead operator not working as aggregation operator

2015-11-02 Thread Shagun Sodhani
I was referring to this jira issue : https://issues.apache.org/jira/browse/TAJO-919 On Mon, Nov 2, 2015 at 4:03 PM, Shagun Sodhani wrote: > Hi! I was trying out window functions in SparkSql (using hive context) > and I noticed that while this >

Re: Lead operator not working as aggregation operator

2015-11-02 Thread Herman van Hövell tot Westerflier
Hi, This is more a question for the User list. Lead and Lag imply ordering of the whole dataset, and this is not supported. You can use Lead/Lag in an ordered window function and you'll be fine: *select lead(max(expenses)) over (order by customerId) from tbl group by customerId* HTH Met

Lead operator not working as aggregation operator

2015-11-02 Thread Shagun Sodhani
Hi! I was trying out window functions in SparkSql (using hive context) and I noticed that while this mentions that *lead* is implemented as an aggregate operator, it seems not to be the case. I am using the

Re: Lead operator not working as aggregation operator

2015-11-02 Thread Shagun Sodhani
I get the part about using it with window, but most other window operators also work as aggregator operator and in this case, it is specifically mentioned in the jira issue as well. I asked on dev list and not user list as it was already mentioned in the issue. On Mon, Nov 2, 2015 at 4:15 PM,