You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Shin Chan <ha...@gmx.com> on 2012/04/13 18:00:42 UTC
Nested If else logic
Hi,
Is it possible to do nested if else logic in Pig ?
testevent = foreach recharge generate
(
cond1 ? true1 :
cond2 ? true2 :
cond3 ? true3 :
false3
);
Thanks in advance.
Re: Nested If else logic
Posted by Jonathan Coveney <jc...@gmail.com>.
yes, but I think currently, you're going to have to put parens around each
conditional
2012/4/13 Shin Chan <ha...@gmx.com>
> Hi,
>
> Is it possible to do nested if else logic in Pig ?
>
> testevent = foreach recharge generate
>
> (
> cond1 ? true1 :
>
> cond2 ? true2 :
>
> cond3 ? true3 :
>
> false3
>
> );
>
> Thanks in advance.
>