You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Neal Richardson (Jira)" <ji...@apache.org> on 2022/06/07 13:04:00 UTC

[jira] [Updated] (ARROW-16768) [R] Factor levels cannot contain NA

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

Neal Richardson updated ARROW-16768:
------------------------------------
    Summary: [R] Factor levels cannot contain NA  (was: Factor variables in R with missing values cause an error for write_parquet)

> [R] Factor levels cannot contain NA
> -----------------------------------
>
>                 Key: ARROW-16768
>                 URL: https://issues.apache.org/jira/browse/ARROW-16768
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 7.0.0
>            Reporter: Kieran Martin
>            Priority: Minor
>
> If you try to write a data frame with a factor with a missing value to parquet, you get the error: "Error: Invalid: Cannot insert dictionary values containing nulls". 
> This seems likely due to how the metadata for factors is currently captured in parquet files. Reprex follows:
>  
> library(arrow)
> bad_data <- data.frame(A = factor(1, 2, NA))
> write_parquet(bad_data, tempfile())
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)