[ https://issues.apache.org/jira/browse/PIG-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Coveney updated PIG-2317: ---------------------------------- Attachment: pigjruby.rb PigUdf.rb jruby_scripting_3.patch Ok, so I had some time (and by had some time I mean didn't stop working for the past however many hours), and I sat down and tried to do this. This code is REALLY rough, but I'd rather start a dialogue around a) the design and b) the implementation. I'm sure I did some dumb stuff and would love to hear it. GIGANTIC NOTE: the Algebraic piece is EXTREMELY buggy. Right now it's mainly just a proof of concept: it gets heap space errors right and left. I included it mainly in the hope that people could eyeball it and tell me if there is anything dumb I'm doing...short of that I need to just rest a bit and give it some fresh eyeballs, and I'll use yourkit to profile it. But there's something weird going on somewhere, perhaps with the Ruby runtime environment running in parallel.. Also, I know that you are more of a Ruby guy than I am, Jacob, so you can take a look at that end of things. Would there be any other features/syntax that would simplify things for poeple? As is it's pretty concise Non design to do: - make it compatible with 0.9.0 - clean it up (I really need to organize the code and see what needs to be ripped into other classes) - write tests - figure out - put in logic that will opportunistically run the intermediate function on the intermediate output (how does Pig normally make this choice?) - add an accumulator interface (it would be minimal work with what I already have) - need to have a better way to provide the tuple/databag abstraction in Ruby. The current method is pretty nasty to work with, and you get functions that receive [[[element]]], and whatnot (you'll see that in my code) - tear into my code/design > Ruby/Jruby UDFs > --------------- > > Key: PIG-2317 > URL: https://issues.apache.org/jira/browse/PIG-2317 > Project: Pig > Issue Type: New Feature > Reporter: Jacob Perkins > Assignee: Jacob Perkins > Priority: Minor > Fix For: 0.9.2 > > Attachments: PigUdf.rb, jruby_scripting.patch, > jruby_scripting_2_real.patch, jruby_scripting_3.patch, pigjruby.rb > > > It should be possible to write UDFs in Ruby. These UDFs will be registered in > the same way as python and javascript UDFs. -- 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