You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Romain François (Jira)" <ji...@apache.org> on 2019/09/09 07:02:00 UTC

[jira] [Assigned] (ARROW-6365) [R] Should be able to coerce numeric to integer with schema

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

Romain François reassigned ARROW-6365:
--------------------------------------

    Assignee: Romain François

> [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
>             Fix For: 0.15.0
>
>
> 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)