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

Switch to Plain View
Pig, mail # user - Small question


+
abhishek dodda 2012-10-03, 00:04
+
Abhishek 2012-10-12, 14:05
+
Arun Ahuja 2012-10-12, 15:26
Copy link to this message
-
Re: Small question
Abhishek 2012-10-12, 16:54
Thanks Arun  you are right.

Sent from my iPhone

On Oct 12, 2012, at 11:26 AM, Arun Ahuja <[EMAIL PROTECTED]> wrote:

> From my interpretation Hive coaelsce returns the first non-null value.
>
> So it seems you are just doing a null check on x and return y if it is
> null and z otherwise?
>
> In Pig you could do something like --- " (x is null ? y : z)  This a
> standard ternary if/else.  Don't see if the 0.00 actually plays any
> other role than the null check, right?
>
> On Fri, Oct 12, 2012 at 10:05 AM, Abhishek <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> How to Hive coalesce statement in pig
>>
>> Example:
>>
>> Case when
>> Coalesce(x,0.00)=0.00 then y else z
>>
>> How to write this in pig
>>
>> Regards
>> Abhi