pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vivek Padmanabhan (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PIG-2309) Keyword 'NOT' is wrongly treated as a UDF in split statement
Date Thu, 29 Sep 2011 11:18:45 GMT
Keyword 'NOT' is wrongly treated as a UDF in split statement

                 Key: PIG-2309
                 URL: https://issues.apache.org/jira/browse/PIG-2309
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.9.0
            Reporter: Vivek Padmanabhan

In the below script, the keyword NOT is wrongly interpreted as  UDF. 

register empty.jar;
a = load 'myinput' as (f1:chararray);
SPLIT a INTO a1 IF (EMPTY((chararray)f1) ), a2 IF(NOT(EMPTY((chararray)f1)) );
dump a2;

import java.io.IOException;
import org.apache.pig.FilterFunc;
import org.apache.pig.data.Tuple;
public class EMPTY extends FilterFunc {
	    public Boolean exec(Tuple input) throws IOException {
	            return new Boolean ( ((String)input.get(0)).isEmpty() );


This is issue is observed in 0.9 most likely because of the new parser, Pig 0.8 works fine
with this script. 
Would be helpful to know any workarounds in 0.9. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message