Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - How to convert Array to String in Hive0.7


Copy link to this message
-
Re: How to convert Array to String in Hive0.7
Stephen Sprague 2013-06-14, 16:06
remember too the transform() function for rolling your own, well,
transformations.
On Fri, Jun 14, 2013 at 3:07 AM, Jan Dolinár <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I was facing the same problem few weeks ago. The final solution was quick
> and dirty - I grabbed the code for this UDF from
> http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFConcatWS.java?revision=1234150&view=markup&pathrev=1234150and compiled it the same way as my other UDFs.
>
> The only part that doesn't work with hive 0.7 is the argument type
> checking in initialize() method because of serdeConstants were not
> available in this version. The dirty part of the solution is that I just
> commented out all but last two lines of this method and the serdeConstants
> import :-) As long as you don't pass wrong arguments to it, it works fine,
> otherwise you get an error at runtime, while proper code should refuse to
> even compile the query.
>
>
>
> On Fri, Jun 14, 2013 at 11:51 AM, lxw <[EMAIL PROTECTED]> wrote:
>
>> Hi, all :
>>
>>     How to convert Array to String in Hive0.7?
>>
>>     concat_ws(string SEP, array<string>) Like concat_ws() above, but
>> taking an array of strings. (as of Hive 0.9.0<https://issues.apache.org/jira/browse/HIVE-2203>)
>>
>>
>>     this function was not supported,who can help me?
>>
>>
>> thanks!
>>
>>
>>
>>
>>
>>
>>
>
>