Hi guys, I am trying to use the reflect UDF for an UUID method and am getting an exception. I believe this function should be available in java 1.6.0_31 the system is running. select reflect("java.util.UUID", "hashCode", uid_str) my_uid,
... My suspicion is, this is because the hive column I am calling this on is a string and not an UUID. So I nested the reflects as shown below to go from a string to an UUID first and then to "hashCode" it. reflect("java.util.UUID", "hashCode", reflect("java.util.UUID", "fromString", uid_str)) my_uid, In either case, I always get the exception below though the row of data it prints has no null for the uid_str column. Any ideas? at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:565)
You can write UDF's in groovy now. That pretty much means. You can just write a quick method inline now. Makese udf reflect much less useful. On Thu, Apr 3, 2014 at 2:22 PM, Andy Srine <[EMAIL PROTECTED]> wrote:
Just to add to my previous question, I see this example in Hive documentation for the "reflect" UDF. What object or string is the "isEmpty" method working on in the example below? What I am trying to do with hashCode() is something similar.