hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shravan Matthur Narayanamurthy (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-597) Pig does not handdle correctly the case where "*" is passed to UDF
Date Fri, 16 Jan 2009 14:51:00 GMT

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

Shravan Matthur Narayanamurthy updated PIG-597:
-----------------------------------------------

    Attachment:     (was: 597.patch)

> Pig does not handdle correctly the case where "*" is passed to UDF
> ------------------------------------------------------------------
>
>                 Key: PIG-597
>                 URL: https://issues.apache.org/jira/browse/PIG-597
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Olga Natkovich
>            Assignee: Shravan Matthur Narayanamurthy
>         Attachments: 597.patch
>
>
> Script:
> ======
> A = LOAD 'foo' USING PigStorage('\t');
> B = FILTER A BY ARITY(*) < 5;
> DUMP B;
> Error:
> =====
> 2009-01-05 21:46:56,355 [main] ERROR
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc
> - Caught error from UDF
> org.apache.pig.builtin.ARITY[org.apache.pig.data.DataByteArray cannot be cast to org.apache.pig.data.Tuple
[org.apache.pig.data.DataByteArray cannot be cast to org.apache.pig.data.Tuple]
> Problem:
> =======
> Santhosh tracked this to the following code in POUserFunc.java:
> if(op instanceof POProject &&
>                         op.getResultType() == DataType.TUPLE){
>                     POProject projOp = (POProject)op;
>                     if(projOp.isStar()){
>                         Tuple trslt = (Tuple) temp.result;
>                         Tuple rslt = (Tuple) res.result;
>                         for(int i=0;i<trslt.size();i++)
>                             rslt.append(trslt.get(i));
>                         continue;
>                     }
>                 }
> It seems to be unwrapping the tuple before passing it to the function. There is no comments
so we are not sure why it is there; will need to run tests to see if removing it would solve
this issue and not create others.

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


Mime
View raw message