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

Daniel Dai commented on PIG-566:
--------------------------------

Usually we convert a double into an integer by truncating. Returning null in 
this case break backward compatibility unnecessarily. Ideally the behavior of 
bytesToInteger is:
* Integer.MIN_INTEGER <= d < Integer.MAX_INTEGER+1: return ceil(d)
* Return null otherwise

> Dump and store outputs do not match for PigStorage
> --------------------------------------------------
>
>                 Key: PIG-566
>                 URL: https://issues.apache.org/jira/browse/PIG-566
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0, 0.8.0
>            Reporter: Santhosh Srinivasan
>            Assignee: Gianmarco De Francisci Morales
>            Priority: Minor
>             Fix For: 0.7.0, 0.8.0
>
>         Attachments: PIG-566.patch, PIG-566.patch, PIG-566.patch
>
>
> The dump and store formats for PigStorage do not match for longs and floats.
> {code}
> grunt> y = foreach x generate {(2985671202194220139L)};
> grunt> describe y;
> y: {{(long)}}
> grunt> dump y;
> ({(2985671202194220139L)})
> grunt> store y into 'y';
> grunt> cat y
> {(2985671202194220139)}
> {code}

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