Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Small question


Copy link to this message
-
Re: Small question
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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB