[ 
https://issues.apache.org/jira/browse/PIG-893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740188#action_12740188
 ] 

Alan Gates commented on PIG-893:
--------------------------------

CastUtil should not include byteToX() calls.  Pig never casts from ByteArray to 
a type, it leaves that to loaders because Pig has no idea what the 
representation of the data is in the bytes.  It might be UTF8 (as it is for 
PigStorage) or something entirely different.

CastUtil.stringToX calls should not call byteToX methods.  This is inefficient 
since those methods just turn the bytes back into a String and then do the 
conversion explicitly.

> support cast of chararray to other simple types
> -----------------------------------------------
>
>                 Key: PIG-893
>                 URL: https://issues.apache.org/jira/browse/PIG-893
>             Project: Pig
>          Issue Type: New Feature
>    Affects Versions: 0.4.0
>            Reporter: Thejas M Nair
>            Assignee: Jeff Zhang
>             Fix For: 0.4.0
>
>         Attachments: Pig_893_Patch.txt
>
>
> Pig should support casting of chararray to 
> integer,long,float,double,bytearray. If the conversion fails for reasons such 
> as overflow, cast should return null and log a warning.

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