[ 
https://issues.apache.org/jira/browse/PIG-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126223#comment-13126223
 ] 

Jonathan Coveney commented on PIG-2317:
---------------------------------------

As far as how to specify schema, another option would be to have a class 
function "schema" which sets the schema for the following function definition.

schema "str:chararray"
def hello_world
  "hello world"
end

schema "word:chararray,num:long"
def complex(word)
  [word,word.length]
end

or even (the probably easier to code, and both could be support)

def hello_world
  "hello world"
end

def complex(word)
  [word,word.length]
end

schema :hello_world, "str:chararray"
schema :complex, "word:chararray,num:long"

I don't think this would be super hard, I'd be willing to help make it work if 
you guys think it'd be easier or more elegant
                
> 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: jruby_scripting.patch
>
>
> 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

        

Reply via email to