[ https://issues.apache.org/jira/browse/PIG-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845017#action_12845017 ]
Julien Le Dem commented on PIG-928: ----------------------------------- Hi Woody, Some comments: - Schema parsing: I notice that you wrote a Schema parser in EvalBase. It took me a while to figure out but you can do that with the following Pig class org.apache.pig.impl.logicalLayer.parser.QueryParser using the following code: QueryParser parser = new QueryParser(new StringReader(schema)); result = parser.TupleSchema(); for example: String schema = "relationships:{t:(target:chararray, candidate:chararray)}" and you get a Schema instance back. - Different options for passing the Python code to the hadoop nodes: I notice you pass the Python functions by creating a .py file included in the jar which is then loaded through the class loader. I pass the python code to the nodes by adding it as a parameter of my UDF constructor (encoded in a string). The drawback is that it is verbose as it gets included for every function. > UDFs in scripting languages > --------------------------- > > Key: PIG-928 > URL: https://issues.apache.org/jira/browse/PIG-928 > Project: Pig > Issue Type: New Feature > Reporter: Alan Gates > Attachments: package.zip, pyg.tgz, scripting.tgz, scripting.tgz > > > It should be possible to write UDFs in scripting languages such as python, > ruby, etc. This frees users from needing to compile Java, generate a jar, > etc. It also opens Pig to programmers who prefer scripting languages over > Java. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.