arrow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neal Richardson (Jira)" <j...@apache.org>
Subject [jira] [Created] (ARROW-7045) [R] Factor type not preserved in Parquet roundtrip
Date Fri, 01 Nov 2019 20:47:00 GMT
Neal Richardson created ARROW-7045:
--------------------------------------

             Summary: [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


{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)

Mime
View raw message