Jython UDF does not handle boolean output
-----------------------------------------

                 Key: PIG-2596
                 URL: https://issues.apache.org/jira/browse/PIG-2596
             Project: Pig
          Issue Type: Bug
            Reporter: Daniel Dai


When a Jython UDF returns boolean, we still get integer object in Pig, through 
describe show the right boolean type.
Jython UDF:
{code}
@outputSchema("retired:boolean")
def isretired(age):
    if age == None:
        return None
    elif age>=60:
        return True
    else:
        return False
{code}
Pig script:
{code}
register 'scriptingudf.py' using jython as myfuncs;
a = load 'student.txt' as (name:chararray, age:int, gpa:double);
b = foreach a generate name, myfuncs.isretired(age);
describe b;
dump b;
{code}

--
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

        

Reply via email to