[ 
https://issues.apache.org/jira/browse/ARROW-7045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008948#comment-17008948
 ] 

Neal Richardson commented on ARROW-7045:
----------------------------------------

Nice work. A PR would be great, thanks!

> [R] Factor type not preserved in Parquet roundtrip
> --------------------------------------------------
>
>                 Key: ARROW-7045
>                 URL: https://issues.apache.org/jira/browse/ARROW-7045
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>            Reporter: Neal Richardson
>            Priority: Major
>
> {code:r}
> test_that("Factors are preserved when writing/reading from Parquet", {
>   tf <- tempfile()
>   on.exit(unlink(tf))
>   df <- data.frame(a = factor(c("a", "b")))
>   write_parquet(df, tf)
>   expect_equivalent(read_parquet(tf), df)
> })
> {code}
> Fails:
> {code}
> `object` not equivalent to `expected`.
> Component “a”: target is character, current is factor
> {code}
> This has to do with the translation with Parquet and not the R <--> Arrow 
> type mapping (unlike ARROW-7028). If you write_feather and read_feather, the 
> test passes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to