[
https://issues.apache.org/jira/browse/PIG-1479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971120#action_12971120
]
Richard Ding commented on PIG-1479:
-----------------------------------
Thanks Julien. How about the following proposal?
bq. Pig script invocation:
Pig will use the bind() method to implicitly bind variables to local variables
in the current scope. It'll do an implicit mapping of variables in the host
language to parameters in Pig Latin:
{code}
results = pig.compile("<Pig Latin>").bind().run()
{code}
bq. Ability to have the control flow program and the UDFs in the same script:
I agree that it's good to have everything in one script. Since I can't think of
a way to only execute functions in python, I'll go back to use a simple parser
to separate functions and control flow program so that UDFs can be registered
before the control flow program runs.
A related issue is the python IMPORT statements. Users will be responsible to
ship the imported modules to the backend servers. Pig won't automatically
resolve the module paths and ship the files to the backend.
> Embed Pig in scripting languages
> --------------------------------
>
> Key: PIG-1479
> URL: https://issues.apache.org/jira/browse/PIG-1479
> Project: Pig
> Issue Type: New Feature
> Reporter: Julien Le Dem
> Assignee: Richard Ding
> Fix For: 0.9.0
>
> Attachments: PIG-1479.patch, PIG-1479_2.patch, PIG-1479_3.patch,
> PIG-1479_4.patch, pig-greek-test.tar, pig-greek-test.tar, pig-greek.tgz
>
>
> It should be possible to embed Pig calls in a scripting language and let
> functions defined in the same script available as UDFs.
> This is a spin off of https://issues.apache.org/jira/browse/PIG-928 which
> lets users define UDFs in scripting languages.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.