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/03/07 19:42:00 UTC

[jira] [Closed] (ARROW-15828) [Python][R] ChunkedArray's cast() method combine multiple arrays into one

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

Nicola Crane closed ARROW-15828.
--------------------------------
    Resolution: Not A Problem

> [Python][R] ChunkedArray's cast() method combine multiple arrays into one
> -------------------------------------------------------------------------
>
>                 Key: ARROW-15828
>                 URL: https://issues.apache.org/jira/browse/ARROW-15828
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python, R
>    Affects Versions: 7.0.0
>            Reporter: SHIMA Tatsuya
>            Priority: Major
>
> It appears that if I try to cast to int or float, the array will be one.
> {code:r}
> library(arrow, warn.conflicts = FALSE)
> #> See arrow_info() for available features
> chunked_array(1:2, 3:4, 5:6)$cast(string())
> #> ChunkedArray
> #> [
> #>   [
> #>     "1",
> #>     "2"
> #>   ],
> #>   [
> #>     "3",
> #>     "4"
> #>   ],
> #>   [
> #>     "5",
> #>     "6"
> #>   ]
> #> ]
> chunked_array(1:2, 3:4, 5:6)$cast(float64())
> #> ChunkedArray
> #> [
> #>   [
> #>     1,
> #>     2,
> #>     3,
> #>     4,
> #>     5,
> #>     6
> #>   ]
> #> ]
> chunked_array(1:2, 3:4, 5:6)$cast(int64())
> #> ChunkedArray
> #> [
> #>   [
> #>     1,
> #>     2,
> #>     3,
> #>     4,
> #>     5,
> #>     6
> #>   ]
> #> ]
> chunked_array(1:2, 3:4, 5:6)$cast(date32())
> #> ChunkedArray
> #> [
> #>   [
> #>     1970-01-02,
> #>     1970-01-03
> #>   ],
> #>   [
> #>     1970-01-04,
> #>     1970-01-05
> #>   ],
> #>   [
> #>     1970-01-06,
> #>     1970-01-07
> #>   ]
> #> ]
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)