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.
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
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
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
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
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:
ghav 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 collect_set(col) on a table got an array as output. I want to
> cast it to string for furthur processing
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 use
I used function collect_set(col) on a table got an array as output. I
want to cast it to string for furthur processing. Is there a function to
accomplish this.
With Regards,
Raghav.