[R] writing/reading a data.frame with column class 'list' changes column class
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
(and in addition, adds a `ptype` attribute - as already detailed in #15248)
```r
# One way to create a column with 'list' class:
library(tibble)
tb <- tibble(list_column = list(c(a = 1, b = 2)))
df <- as.data.frame(tb)
class(df$list_column)
# [1] "list"
# Write + read back:
tmpf <- tempfile()
arrow::write_feather(df, tmpf)
df2 <- arrow::read_feather(tmpf)
class(df2$list_column)
# [1] "arrow_list" "vctrs_list_of" "vctrs_vctr" "list"
unlink(tmpf)
```
### Component(s)
R
Contributor guide
Research direction
Start with the R reproduction using arrow::write_feather() and arrow::read_feather(), then trace how a data.frame list column is converted during the round trip. Done means the column retains class "list" after reading and the unwanted ptype attribute is not added; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100