[ 
https://issues.apache.org/jira/browse/PIG-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Craig Macdonald updated PIG-112:
--------------------------------

    Attachment: patch.import

initial patch for adding an import command to grunt.

This patch has a problem - I cant do any dump commands after applying the 
patch, so I have probably broken something in PigScriptParser.jj

{code}
grunt> dump urls
2008-02-18 11:47:27,907 [main] ERROR org.apache.pig.tools.grunt.GruntParser - 
Encountered "urls" at line 3, column 6.
Was expecting:
    <IDENTIFIER> ...

org.apache.pig.tools.pigscript.parser.ParseException: Encountered "urls" at 
line 3, column 6.
Was expecting one of:
    <EOF>
    "cat" ...
    "cd" ...
    "cp" ...
    "copyFromLocal" ...
    "copyToLocal" ...
    "define" ...
    "dump" ...
    "describe" ...
    "explain" ...
    "help" ...
    "import" ...
    "kill" ...
    "ls" ...
    "mv" ...
    "mkdir" ...
    "pwd" ...
    "quit" ...
    "register" ...
    "rm" ...
    "set" ...
    "store" ...
    "scriptDone" ...
    "" ...
    <EOL> ...
    ";" ...
{code}

Can someone give a look?

Thanks

Craig

> Allow Java packages to be searched for functions.
> -------------------------------------------------
>
>                 Key: PIG-112
>                 URL: https://issues.apache.org/jira/browse/PIG-112
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Craig Macdonald
>            Priority: Minor
>         Attachments: patch.import
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Motivation: Why should a user have to supply the fully qualified name to his 
> user defined function, if all the functions he ever uses are in a pre-defined 
> list of packages?
> Currently PigContext has a list of Java packages that are searched for 
> functions. Currently the list consists of the following 
> packages:
>  * org.apache.pig.builtin.
>  * org.apache.pig.impl.builtin.
>  * com.yahoo.pig.yst.sds.ULT.
> Users should be able to add to this packagelist.
> Example in Grunt:
> {noformat}
> include com.pig.function.package.
> {noformat}
> This has connections to imports in Java classes, namespaces in XQuery, and 
> the PATH env var in shell scripting.
> Should be trivial to implement, or could be a property.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to