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-427) casting parameters of a UDF
Date Mon, 29 Sep 2008 06:58:44 GMT

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

Shravan Matthur Narayanamurthy updated PIG-427:
-----------------------------------------------

    Attachment: 427-3.patch

With all the changes, had left out the statement to set the found matching spec as the new
func spec in LOUserFunc.

One extraneous change is in src/org/apache/pig/pen/EquivalenceClasses.java which has an unused
import which was causing an error in eclipse. Removed that in this patch.

> casting parameters of a UDF
> ---------------------------
>
>                 Key: PIG-427
>                 URL: https://issues.apache.org/jira/browse/PIG-427
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: types_branch
>            Reporter: Olga Natkovich
>            Assignee: Shravan Matthur Narayanamurthy
>             Fix For: types_branch
>
>         Attachments: 427-1.patch, 427-2.patch, 427-3.patch, 427.patch
>
>
> Currently if we have a UDF that declares via getArgToFuncMapping that it can only handle
a subset of types, passing any other types to the function would result in an error. However,
some types can be promoted to others and it would be useful if typechecker to perform best
fit cast. For instance, if the input parameter has type of Long and the UDF support Int and
Double, the code should cast the paraneter into Double.
> This would be very useful for conversion of the UDFs from the piigybank to the new code.

-- 
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