You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/09/12 13:31:00 UTC

[jira] [Resolved] (ARROW-17620) [R] as_arrow_array() ignores type argument for StructArrays

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

Nicola Crane resolved ARROW-17620.
----------------------------------
    Fix Version/s: 10.0.0
       Resolution: Fixed

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

> [R] as_arrow_array() ignores type argument for StructArrays
> -----------------------------------------------------------
>
>                 Key: ARROW-17620
>                 URL: https://issues.apache.org/jira/browse/ARROW-17620
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>            Reporter: François Michonneau
>            Assignee: François Michonneau
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 10.0.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> While `Arrow$create()` respects the types provided by the `type` argument, they are ignored when using `as_arrow_array()`. Compare the output below:
>  
> {code:java}
> library(arrow, warn.conflicts = FALSE)
> dataset <- data.frame(
> a = 1,
> b = 2,
> c = 3
> )
> types <- struct(a = int16(), b = int32(), c = int64())
> as_arrow_array(
> dataset, 
> type = types
> )$type
> #> StructType
> #> struct<a: double, b: double, c: double>
> Array$create(
> dataset, 
> type = types
> )$type
> #> StructType
> #> struct<a: int16, b: int32, c: int64>{code}
> I have identified the bug and will submit a PR.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)