You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "François Michonneau (Jira)" <ji...@apache.org> on 2022/09/05 16:23:00 UTC
[jira] [Created] (ARROW-17620) [R] as_arrow_array() ignores type argument for StructArrays
François Michonneau created ARROW-17620:
-------------------------------------------
Summary: [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
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)