You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/09/05 16:55:00 UTC
[jira] [Updated] (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 ]
ASF GitHub Bot updated ARROW-17620:
-----------------------------------
Labels: pull-request-available (was: )
> [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
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> 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)