Take a look at this
https://issues.apache.org/jira/browse/PIG-2276

May be a workaround could be to check for the size of the return value from
REGEX_EXTRACT instead of using "is null"

Best,
Prashant Kommireddi

On Thu, Dec 1, 2011 at 2:48 PM, Dan Yi <[email protected]> wrote:

> can anyone tell me why the following won't work
>
> i have bags like this:
>
> x:
> (utm_source,3)
> (sprint_&utm_medium,3)
> (banner&utm_campaign,3)
> (sprint,3)
>
> i wanna filter out all the bags with 'utm' included and get the last one
> (sprint, 3),
> this is what i used:
>
> y = FILTER x BY REGEX_EXTRACT($0, '(.*)utm(.*)', 0) == null;
> this one return nothing;
>
> y = FILTER x BY REGEX_EXTRACT($0, '(.*)utm(.*)', 0) is null;
> this one return:
> ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing.
> Encountered " "is" "is "" at line 1, column 53.
> Was expecting one of:
>    "parallel" ...
>    "and" ...
>    "or" ...
>    ";" ...
>
> please help!
>
>

Reply via email to