ask and ye shall receive.  thats some hot stuff right there.

i think i will have to wait a while for it as i am stuck on 0.4.0 for a bit.  
Thanks!

On Feb 4, 2010, at 5:20 PM, Todd Lipcon wrote:

> Hey Adam,
> 
> Sounds like you want something like
> select max(struct(timestamp, value)) group by hash;
> 
> This feature is really new - see HIVE-1128 and HIVE-1130
> 
> -Todd
> 
> On Thu, Feb 4, 2010 at 5:04 PM, Adam J. O'Donnell <[email protected]> wrote:
>> Guys:
>> 
>> I have a series of queries that looks for the most recent value associated 
>> with a given key.  For example, consider the following query:
>> 
>> select max(timestamp), hash, most_recent(value) group by hash.
>> 
>> Right now I do this by a hack: I grab max(timestamp * 100 + value), then I 
>> grab the value off the end of the computed maximum.
>> 
>> Is there a smarter way of doing this?  It seems like it would be a 
>> relatively common query.
>> 
>> --
>> Adam J. O'Donnell, Ph.D.
>> Immunet Corporation
>> Cell: +1 (267) 251-0070
>> 
>> 

--
Adam J. O'Donnell, Ph.D.
Immunet Corporation
Cell: +1 (267) 251-0070

Reply via email to