Re: UDF reflect

2014-04-03 Thread Andy Srine
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. SELECT reflect("java.lang.String", "valueOf", 1),

Re: UDF reflect

2014-04-03 Thread John Meagher
s Edward. But "inline groovy" is available on Hive 13 right? I am using > an older version. > > Best, > Andy > > > > On Thu, Apr 3, 2014 at 11:37 AM, Edward Capriolo > wrote: >> >> You can write UDF's in groovy now. That pretty much means. You c

Re: UDF reflect

2014-04-03 Thread Andy Srine
Thanks Edward. But "inline groovy" is available on Hive 13 right? I am using an older version. Best, Andy On Thu, Apr 3, 2014 at 11:37 AM, Edward Capriolo wrote: > You can write UDF's in groovy now. That pretty much means. You can just > write a quick method inline no

Re: UDF reflect

2014-04-03 Thread Edward Capriolo
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 wrote: > Thanks Szehon and Peyman, I want to call hashCode() on the UUID object. > This object i

Re: UDF reflect

2014-04-03 Thread Andy Srine
Thanks Szehon and Peyman, I want to call hashCode() on the UUID object. This object is stored in the table as a string, but I can convert it to UUID. Thats not the problem. Basically the question is, how do we call this reflect UDF on methods that takes no arguments? How do I do the following usin

Re: UDF reflect

2014-04-03 Thread Peyman Mohajerian
Maybe your intention is the following: reflect("java.util.UUID", "randomUUID") On Thu, Apr 3, 2014 at 2:33 AM, Szehon Ho wrote: > Hi, according to the description of the reflect UDF, you are trying to > call java.util.UUID.hashcode(uidString), which doesnt seem to be an > existing method on eit

Re: UDF reflect

2014-04-02 Thread Szehon Ho
Hi, according to the description of the reflect UDF, you are trying to call java.util.UUID.hashcode(uidString), which doesnt seem to be an existing method on either java 6/7. http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html#hashCode() Thanks Szehon On Wed, Apr 2, 2014 at 2:13 PM,

UDF reflect

2014-04-02 Thread Andy Srine
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