Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
This is the below data in my Table1 BID PID TIME --+-+ 1345653 330760137950 2012-07-09 21:42:29 1345653 330760137950 2012-07-09 21:43:29 1345653 330760137950 2012-07-09 21:40:29

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
Tromans wrote: > Your rank() is being evaluated map side. Put your distribute by and sort > by in an inner query, and then evaluate your rank() in an outer query. > > Phil. > On Jul 19, 2012 9:00 PM, "comptech geeky" wrote: > >> This is the below data i

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
50 2012-07-09 21:42:29* *1345653330760137950 2012-07-09 21:41:29* 1345653110909316904 2012-07-09 21:29:06 1345653221065796761 2012-07-09 19:31:48 On Thu, Jul 19, 2012 at 1:29 PM, comptech geeky wrote: > Can you show me the exact query that I need to do for

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
BY bid,pid,time* *SORT BY bid, time desc* *) a* *WHERE rank(bid) < 3;* On Thu, Jul 19, 2012 at 1:41 PM, comptech geeky wrote: > I wrote this query after modifying it- > > *SELECT buyer_id, item_id, rank(buyer_id), created_time, > UNIX_TIMESTAMP(created_time)* > *FROM (* >

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
Can anyone help me with this? I have tried other options by tweaking the query also. I am not able to achieve my expected output. On Thu, Jul 19, 2012 at 1:45 PM, comptech geeky wrote: > Modified Query that I wrote and its not working as expected output is. > > * > * > *SELECT

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
ote: > Remove pid,time from DISTRIBUTE BY. > > On Thu, Jul 19, 2012 at 1:45 PM, comptech geeky > wrote: > >> Modified Query that I wrote and its not working as expected output is. >> >> * >> * >> *SELECT bid, pid, rank(bid), time, UNIX_TIMESTAMP(time)*

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
: > I am not really aware of your use case. > Play around with it. At least the rank function is now properly applied. > > > Maybe, remove pid from the DISTRIBUTE and de SORT clauses ?? > > Jasper > > > > > 2012/7/20 comptech geeky > >> Hi Igor, &

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
nse. > > On Thu, Jul 19, 2012 at 3:57 PM, Igor Tatarinov wrote: > >> Sorry, just pid needs to be dropped from both DISTRIBUTE and SORT clauses. >> Your very first query was correct except for the nested subquery part. >> (You don't need a double-nested subquery.) >>

Re: Something wrong with my query to get TOP 3?

2012-07-19 Thread comptech geeky
t I provided below? On Thu, Jul 19, 2012 at 4:05 PM, comptech geeky wrote: > Hi Igor, > > I am new to HiveQL world. Don't know that much basically. Currently I have > my Rank UDF function like this- > > *public final class Rank extends UDF{* > *private int co

Re: What will be the Rank UDF for this particular scenario?

2012-07-20 Thread comptech geeky
nter = 0;* * this.last_key1 = key1;* * this.last_key2 = key2;* * } else {* * this.counter = 0; * * }* * return this.counter++;* *}* *}* On Thu, Jul 19, 2012 at 9:07 PM, comptech geeky wrote: > Below is the table data, I have provided in descending order of time- > &

Re: Disc quota exceeded

2012-07-20 Thread comptech geeky
speculate that it might be your "/tmp" directory out of space > because that is where hive tries to dump a bunch of log entries before it > starts up. (/tmp//hive.log). > > > On Fri, Jul 20, 2012 at 3:12 AM, comptech geeky > wrote: > >> Whenever I am typing Hive at t