Hey Eduardo

Hi Thanks for writing this UDF, pretty neat.
I ran into a few problems with null values (hive 0.7.1)
 ( was getting null pointer exceptions on previousKey[index].getClass() )  ,
 not sure if you want this minor fix, I suppose most people operate on non-null data.
I wasn't able to write a test case to highlight it, I had a problem with the mvn test target:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.jointhegrid:hive_test:jar:3.0.1-SNAPSHOT

Thanks again
Matt