You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by 181514832 <hi...@foxmail.com> on 2014/05/11 15:43:46 UTC

python UDF types problem

hi, there


I'm running the tutorial, and it works well, however when i want to try python UDF, I got something wrong.
I wrote a very simple python script:

@outputSchema("query:chararray")

def ToLower(query):

    return str(str(query).lower()




and i use this to replace the 'ToLower' in script1-local.pig which is implemented in the tutorial.jar.

And i ran the script again, i got totally different result.

I found that, after this new 'ToLower' script executed, the temporary result looks like:

BED75271605EBD0C    970916001949    array('b', [121, 97, 104, 111, 111, 32, 99, 104, 97, 116])







and in the UDF manual page, i cannot find the python-pig type mapping.




So, please help.




Thanks a lot!