----------------------------------------------------
Key: PIG-2276
URL: https://issues.apache.org/jira/browse/PIG-2276
Project: Pig
Issue Type: Bug
Components: parser
Affects Versions: 0.9.0, 0.8.0
Environment: Debian Squeeze, Mac OS X 10.7.1, java 1.6.0_26,
Reporter: xavier
Applying "is null" to the result of a UDF inside the ternary operator gives a syntax error:
A = LOAD 'data.tsv' AS (a, b);
B = FOREACH A GENERATE ( parseNull(a) is null ? 1 : 0 );
gives the following error: Syntax error, unexpected symbol at or near 'parseNull'
The same error happens if parseNull is replaced by any other function, e.g. (TRIM(a) is null ? 1 : 0) will give the same error message.
However (a is null ? 1 : 0) and (parseNull(a) == '' ? 1 : 0) gets parsed without error, so it is related to the combination of "is null" and the result of a UDF.
Thanks,
X
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira