paleolimbot commented on issue #15033:
URL: https://github.com/apache/arrow/issues/15033#issuecomment-1368987376

   Thanks for bringing this up...we should almost certainly be erroring if we 
are about to drop information in an unrecoverable way. The workaround is 
probably to go through `serialize()`:
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   #> Some features are not enabled in this build of Arrow. Run `arrow_info()` 
for more information.
   
   df <- tibble::tibble(list_column = list(c(a = 1, b = 2)))
   df$list_column <- lapply(df$list_column, serialize, NULL)
   
   table <- as_arrow_table(df)
   df2 <- as.data.frame(table)
   df2$list_column <- lapply(df$list_column, unserialize)
   
   str(df2)
   #> tibble [1 × 1] (S3: tbl_df/tbl/data.frame)
   #>  $ list_column:List of 1
   #>   ..$ : Named num [1:2] 1 2
   #>   .. ..- attr(*, "names")= chr [1:2] "a" "b"
   ```
   
   <sup>Created on 2023-01-02 with [reprex 
v2.0.2](https://reprex.tidyverse.org)</sup>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to