Gotcha, thanks !
pk
Praveen,
My apologies--I meant to suggest a streaming function because a UDF would
not be able to hold state either. Look at the documentation for TRANSFORM (
http://wiki.apache.org/hadoop/Hive/LanguageManual/Transform ). Your
transformation script can be used to compare timestamps from successiv
Do you mean that my UDF would store the timestamp of the current row in a
static field in the UDF's implementation, and when processing the next row, use
that field to get the previous row's value ?
Can anyone comment on whether that's safe, re: I'm not familiar with Hive
internals ?
Thanks,
Praveen,
This would be best accomplished with a UDF because Hive does not support
cursors.
Best of luck,
Tim
On Fri, Jun 10, 2011 at 10:29 PM, Praveen Kumar wrote:
> If I have table timestamps:
>
> hive> desc timestamps;
>
> OK
> ts bigint
>
>
> hive> select ts from timestamps order by t