jonkeane commented on pull request #8650:
URL: https://github.com/apache/arrow/pull/8650#issuecomment-788404473


   Ok, I've looked at this more, and my first reprex was a bit _too_ minimal it 
looks like. Here is another example/test we could/should add to exercise this 
(I'm happy to push a commit including it to this branch if you would like):
   
   ```
   test_that("sf-like list columns", {
     df <- structure(list(col = 
structure(list(structure(list(list(structure(1))), class = "inner")), class = 
"outer")), class = "data.frame")
     expect_array_roundtrip(df)
   })
   ```
   
   The fix that you made does fix an error on the `inner` "class", but I 
believe that 
https://github.com/apache/arrow/blob/fe1c774813e9ce7123f6bb02c43bca1664e8370b/r/src/r_to_arrow.cpp#L1014
 is tripping on the `outer` "class".
   
   This was extra-fun to debug (and explains why the sf example above worked) 
because it looks like sf [registers some 
vctrs](https://github.com/r-spatial/sf/blob/master/R/tidyverse-vctrs.R) methods 
which mean that these will work so long as those have been registered (i.e. 
whenever `sf` is used). 
   
   I suspect that it would be very infrequent to have someone want to 
round-trip a parquet file including sf data without also having sf loaded (so 
in practice the current state would be fine), attempting to debug what's going 
on is super complicated (and any other non-standard vctrs that use that outer 
level style classing would similarly fail).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to