Hi All, I wrote a UDF that returns a string and here is a sample code: split data into purchased IF ((boolean) (myudf(param)), failed OTHERWISE; As an example, here is the example of that my udf returns:split data into purchased IF ((boolean) (retcode == 'SUCCESS')), failed OTHERWISE; Unfortunately, I get the following error: Apache Pig: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: can't look backwards more than one token in this stream I also tried this: split data into purchased IF ((boolean) '(retcode == 'SUCCESS')'), failed OTHERWISE; I get this error: 2015-06-19 10:10:48,330 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: Syntax error, unexpected symbol at or near '250.00' I also tried this: split data into purchased IF ((boolean) '(retcode == \'SUCCESS\')'), failed OTHERWISE;I don't get any error, but the I don't get the expected result back. Any help with this would be great.