Re: Semantics of Rank.

2013-09-24 Thread Lefty Leverenz
;>>>> following is thrown. >>>>>>> >>>>>>> FAILED: SemanticException Failed to breakup Windowing invocations >>>>>>> into Groups. At least 1 group must only depend on input columns. Also >>>>>>> ch

Re: Semantics of Rank.

2013-09-03 Thread Edward Capriolo
ups. At least 1 group must only depend on input columns. Also >>>>>> check >>>>>> for circular dependencies. >>>>>> Underlying error: >>>>>> org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: One or more >>>>

Re: Semantics of Rank.

2013-09-03 Thread j.barrett Strausser
gt;>>>> http://www.marshut.com/rqvpz/use-rank-over-partition-function-in-hive-11.html >>>>> >>>>> Even if it didn't require an arg it still doesn't explain my anomalous >>>>> output. >>>>> >>>>> >>

Re: Semantics of Rank.

2013-09-03 Thread Lefty Leverenz
t didn't require an arg it still doesn't explain my anomalous >>>> output. >>>> >>>> >>>> >>>> On Wed, Jul 24, 2013 at 11:28 PM, j.barrett Strausser < >>>> j.barrett.straus...@gmail.com> wrote: >>

Re: Semantics of Rank.

2013-09-03 Thread Lefty Leverenz
> >>>> I can file a JIRA if someone can confirm that my query should work. >>>> >>>> >>>> On Wed, Jul 24, 2013 at 11:02 PM, manishbh...@rocketmail.com < >>>> manishbh...@rocketmail.com> wrote: >>>> >>>>> Analytical fu

Re: Semantics of Rank.

2013-07-26 Thread saurabh
cal function doesn't expect any argument. Rank() itself enough >>>> to sequence based on the window you have defined in partition by. So >>>> >>>> Rank() over (partition by cmscustid order by orderdate) >>>> >>>> Should work as

Re: Semantics of Rank.

2013-07-26 Thread j.barrett Strausser
ned in partition by. So >>> >>> Rank() over (partition by cmscustid order by orderdate) >>> >>> Should work as long as I have wrote right syntax for hive. >>> >>> Sent via Rocket from my HTC >>> >>> - Reply message - &g

Re: Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
ition by. So >> >> Rank() over (partition by cmscustid order by orderdate) >> >> Should work as long as I have wrote right syntax for hive. >> >> Sent via Rocket from my HTC >> >> - Reply message - >> From: "j.barrett Strausser"

Re: Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
I have wrote right syntax for hive. > > Sent via Rocket from my HTC > > - Reply message - > From: "j.barrett Strausser" > To: > Subject: Semantics of Rank. > Date: Thu, Jul 25, 2013 1:08 AM > > > Thanks for the reply. Perhaps my misunderstanding of the re

Re: Semantics of Rank.

2013-07-24 Thread manishbh...@rocketmail.com
y HTC - Reply message - From: "j.barrett Strausser" To: Subject: Semantics of Rank. Date: Thu, Jul 25, 2013 1:08 AM Thanks for the reply. Perhaps my misunderstanding of the relation between rank and the windowing function is wrong. What I want to achieve for the following is : For a gi

Re: Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
Thanks for the reply. Perhaps my misunderstanding of the relation between rank and the windowing function is wrong. What I want to achieve for the following is : For a given customer id, sort his orders. I thought the below would work. SELECT eh.cmsorderid, eh.orderdate, RANK(orderdate) w FROM or

Re: Semantics of Rank.

2013-07-24 Thread Shahar Glixman
the argument to rank is simply some value, whereas the rank function compare this value to the previous value received, if value is same, rank returns ++index, otherwise, rank return 1. pseudo code: class Rank { int index; Object previousValue = null; int evaluate(Object value) { if (value == p

Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
It seems as though I am required to pass in an argument to RANK(). What is the effect of passing this argument in ? In a RANK function the output for RANK should be the number of rows preceding a row in a given window. As windows are specified by the partition and order by fields I don't underst