Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
When a Jython UDF returns boolean, we still get integer object in Pig, through describe show the right boolean type.
Jython UDF:
@outputSchema("retired:boolean") def isretired(age): if age == None: return None elif age>=60: return True else: return False
Pig script:
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;
Attachments
Attachments
Issue Links
- is related to
-
PIG-3357 Pig doesn't take care of declared float type and converts it to double
- Open