Skip to content

[R] Parquets do not support list-columns of ordered factors (ordered dictionaries) #49689

Description

@lgaborini

Describe the bug, including details regarding any error messages, version, and platform.

With arrow 23.0.1.2:

data<-tibble::tibble(
x=list(
factor(c("a", "b"), levels= c("c", "b", "a"), ordered=TRUE),
factor(c("b", "c"), levels= c("c", "b", "a"), ordered=TRUE)
)
)
arrow::write_parquet(data, tempfile())
#> Error: Invalid: Column data for field 0 with type list<item: dictionary<values=string, indices=int8, ordered=0>> is inconsistent with schema list<item: dictionary<values=string, indices=int8, ordered=1>>

No issues if x is a list-column of factors (coerced to unsorted dictionaries).
Upstream bug of ropensci/targets#1291.

Component(s)

R

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions