[
https://issues.apache.org/jira/browse/PIG-3294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628026#comment-14628026
]
li xiang commented on PIG-3294:
-------------------------------
Thanks Jeff, I re-post my question here :
Regarding Daniel's change on ExpToPhyTranslationVisitor.java
{code}
510 if (((POUserFunc)p).getFunc().getInputSchema() == null) {
511 ((POUserFunc)p).setFuncInputSchema(op.getSignature());
<-- call setInputSchema()
512 ((EvalFunc)
f).setInputSchema(((POUserFunc)p).getFunc().getInputSchema()); <-- add this
line, call setInputSchema() again
513 }
{code}
SetFuncInputSchema() of class POUserFunc will call setInputSchema(), as
{code}
619 public void setFuncInputSchema(String signature) {
620 Properties props =
UDFContext.getUDFContext().getUDFProperties(func.getClass());
621 Schema
tmpS=(Schema)props.get("pig.evalfunc.inputschema."+signature);
622 if(tmpS!=null) {
623 this.func.setInputSchema(tmpS); <-- here
624 }
625 }
{code}
My question if why you add a line to call setInputSchema() again. Thanks!
> Allow Pig use Hive UDFs
> -----------------------
>
> Key: PIG-3294
> URL: https://issues.apache.org/jira/browse/PIG-3294
> Project: Pig
> Issue Type: New Feature
> Reporter: Daniel Dai
> Assignee: Daniel Dai
> Labels: gsoc2013, java
> Fix For: 0.15.0
>
> Attachments: PIG-3294-1.patch, PIG-3294-2.patch, PIG-3294-3.patch,
> PIG-3294-4.patch, PIG-3294-5.patch, PIG-3294-before-refactory.patch
>
>
> It would be nice if Pig provide some interoperability with Hive. We can wrap
> Hive UDF in Pig so we can use Hive UDF in Pig.
> This is a candidate project for Google summer of code 2013. More information
> about the program can be found at
> https://cwiki.apache.org/confluence/display/PIG/GSoc2013
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)