Re: Converting Array to a String

2011-11-22 Thread Mark Grover
PM Subject: RE: Converting Array to a String Thanks Miguel! That did the trick. Now I just need to sort the input to collect_set(), so I can ‘GROUP BY’ properly. Matt Tucker From: Miguel Cabero [mailto:miguel.cab...@gmail.com] Sent: Friday, November 18, 2011 7:38 PM To: user@hive.

RE: Converting Array to a String

2011-11-22 Thread Tucker, Matt
Thanks Miguel! That did the trick. Now I just need to sort the input to collect_set(), so I can 'GROUP BY' properly. Matt Tucker From: Miguel Cabero [mailto:miguel.cab...@gmail.com] Sent: Friday, November 18, 2011 7:38 PM To: user@hive.apache.org Subject: Re: Converting Array to a

Re: Converting Array to a String

2011-11-18 Thread Miguel Cabero
Hi, The easyest way I found to convert an array into a string in Hive is = something like : 1) ALTER TABLE table_name CHANGE COLUMN array_col_old_name = string_col_new_name string; 2) SELECT REPLACE(string_col_new_name, '\002', ', ') FROM table_name; Regards, Miguel On 19 Nov 2011, at 00:5

Re: Converting Array to a String

2011-11-18 Thread Matt Martin
As currently implemented, the parameters passed to the reflect() UDF must be primitives (and I'm guessing that "collectedSet" is a list). I think this is primarily due to the fact that Hive only supports a limited number of complex types (specifically: list, map, struct, union) and these types are

Re: Converting Array to a String

2011-11-17 Thread Tucker, Matt
I'm running into the same issue, and I see that it's addressed in HIVE-2223. In the meantime, I'm getting an error when trying to use the reflect() function : SELECT reflect("org.apache.commons.lang.StringUtils", "join", collectedSet), ... FAILED: Error in semantic analysis: Line 1:69 Argument t

Re: Converting Array to a String

2011-06-25 Thread Edward Capriolo
The reflect / javamwthod udf might help On Saturday, June 25, 2011, Raghav Kumar Gautam wrote: > Can I use them in hive like I use UDF ? If so, then how can I do that ? > > With Regards, > Raghav. > > "Sobieray, Aaron" > writes: > >> The join() function in StringUtils or Google's Joiner class is

Re: Converting Array to a String

2011-06-25 Thread Raghav Kumar Gautam
Can I use them in hive like I use UDF ? If so, then how can I do that ? With Regards, Raghav. "Sobieray, Aaron" writes: > The join() function in StringUtils or Google's Joiner class is what you're > looking for. > > -Original Message- > From: Raghav Kumar Gautam [mailto:raghavgau...@gm

RE: Converting Array to a String

2011-06-24 Thread Sobieray, Aaron
The join() function in StringUtils or Google's Joiner class is what you're looking for. -Original Message- From: Raghav Kumar Gautam [mailto:raghavgau...@gmail.com] Sent: Wednesday, June 22, 2011 6:52 AM To: user@hive.apache.org Subject: Converting Array to a String I used function coll