Depending on the version you are using you can use bincond operators
(<0.12) or CASE WHEN (>=0.12).

http://pig.apache.org/docs/r0.12.0/basic.html#arithmetic

Rodrigo.

2015-01-20 8:18 GMT-02:00 Serega Sheypak <[email protected]>:

> You can apply ternary operator or SPLIT function
>
> 2015-01-20 11:28 GMT+03:00 patcharee <[email protected]>:
>
> > Hi,
> >
> > I know that there is no if-else in pig, but is it possible to implement
> > this logic in some way "if a input parameter is null, skip this filter
> > operation" ?
> >
> > IF ($MONTH != NULL)
> >     data_filter_by_month = FILTER data by month == $MONTH;
> >
> > BR,
> > Patcharee
> >
>

Reply via email to