Thanks, Nitin.

More specifically, what about empty arrays? How can I convince Hive that an
empty array -- array() -- has a type of array<bigint>?

Thanks again!
Andre'


On 19 December 2013 17:22, Nitin Pawar <nitinpawar...@gmail.com> wrote:

> from what I know, There is no direct way to type cast array directly as of
> now. If its added now then well and good
>
> I normally typecast individual element of the array and then join them
> back (mostly via udf).
>
> I will see if I can find that code
>
>
> On Thu, Dec 19, 2013 at 11:47 AM, Andre Araujo <ara...@pythian.com> wrote:
>
>> Hi, all,
>>
>> Is there a way to typecast arrays in hive? What I want is that for a
>> specific select, where I specify and empty array as the value for one of
>> the columns, for Hive to treat the empty array as array<bigint>, instead of
>> the default, which is array<string>.
>>
>> I searched the documentation but couldn't find any reference to casting
>> arrays. I also tried a few different combinations of the CAST function, but
>> neither worked for arrays.
>>
>> Thanks,
>> Andre
>>
>> --
>> André Araújo
>> The Pythian Group - Australia - www.pythian.com
>>
>> Office (calls from within Australia): 1300 366 021 x1270
>> Office (international): +61 2 8016 7000  x270 *OR* +1 613 565 8696
>> x1270
>> Mobile: +61 410 323 559
>> Fax: +61 2 9805 0544
>> IM: pythianaraujo @ AIM/MSN/Y! or ara...@pythian.com @ GTalk
>>
>> “Success is not about standing at the top, it's the steps you leave
>> behind.” — Iker Pou (rock climber)
>>
>> --
>>
>>
>>
>>
>
>
> --
> Nitin Pawar
>



-- 
André Araújo
Database Administrator / SDM
The Pythian Group - Australia - www.pythian.com

Office (calls from within Australia): 1300 366 021 x1270
Office (international): +61 2 8016 7000  x270 *OR* +1 613 565 8696   x1270
Mobile: +61 410 323 559
Fax: +61 2 9805 0544
IM: pythianaraujo @ AIM/MSN/Y! or ara...@pythian.com @ GTalk

“Success is not about standing at the top, it's the steps you leave behind.”
— Iker Pou (rock climber)

-- 


--



Reply via email to