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

Neal Richardson resolved ARROW-6365.
------------------------------------
    Resolution: Fixed

Issue resolved by pull request 5326
[https://github.com/apache/arrow/pull/5326]

> [R] Should be able to coerce numeric to integer with schema
> -----------------------------------------------------------
>
>                 Key: ARROW-6365
>                 URL: https://issues.apache.org/jira/browse/ARROW-6365
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: R
>            Reporter: Neal Richardson
>            Assignee: Romain François
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.15.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> R is flexible when it comes to integer vs. floating point, generally 
> obscuring the details inside a "numeric" class, but it knows how to make it 
> seem like my integer-looking data stored in a double is actually integer. 
> This means that an R user can think they have integers even when the 
> underlying storage is not. 
> So I would have expected this to work, and indeed to be one reason I'd want 
> to specify a schema when creating a table:
> {code:r}
> > table(a = 1, schema = schema(a = int32()))
> Error in Table__from_dots(dots, schema) : 
>   Invalid: Cannot convert R vector of type REALSXP to integer Arrow array
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to