[ https://issues.apache.org/jira/browse/PIG-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028362#comment-13028362 ]
Julien Le Dem commented on PIG-1824: ------------------------------------ Hi Woody, I had misread the code about automatic deletion. You're right it deletes only if it was created by Pig. I understand the superfluous null check and the warning being somewhat incorrect. To me there should be either no null check in that case or throw some exception if null. This is about debug-ability of the code. If someone changes the behavior of getScriptAsStream() there should be an exception in your code at that point. Not somewhere else. It also helps with understanding the code so that the reader does not wonder why it does nothing when the stream is null (because it's never null. But then why do we check ? etc) otherwise it looks good. Thanks! > Support import modules in Jython UDF > ------------------------------------ > > Key: PIG-1824 > URL: https://issues.apache.org/jira/browse/PIG-1824 > Project: Pig > Issue Type: Improvement > Affects Versions: 0.8.0, 0.9.0 > Reporter: Richard Ding > Assignee: Woody Anderson > Fix For: 0.9.0 > > Attachments: 1824.patch, 1824a.patch, 1824b.patch, 1824c.patch > > > Currently, Jython UDF script doesn't support Jython import statement as in > the following example: > {code} > #!/usr/bin/python > import re > @outputSchema("word:chararray") > def resplit(content, regex, index): > return re.compile(regex).split(content)[index] > {code} > Can Pig automatically locate the Jython module file and ship it to the > backend? Or should we add a ship clause to let user explicitly specify the > module to ship? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira