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

Pi Song commented on PIG-303:
-----------------------------

Is there really a scenario where users might want to cast a known type to 
bytearray and cast it back? I think users should be more happy to always work 
with the known type.

According to the Jira title, I guess if a user, for example, wants UTF-8 
representation of Chararray, then he should use a UDF which returns ByteArray, 
not casting.

My concern is that we shouldn't make LoadFunc more complex just to support an 
operation which doesn't actually have a real use.

> POCast does not cast chararray to bytearray
> -------------------------------------------
>
>                 Key: PIG-303
>                 URL: https://issues.apache.org/jira/browse/PIG-303
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: pig_type_to_bytearray.patch
>
>
> When chararray is cast to bytearray, the query execution fails due to 
> ClassCastException. The problem is inside the getNext(DataByteArray) code in 
> POCast.

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