amoeba commented on PR #45346:
URL: https://github.com/apache/arrow/pull/45346#issuecomment-2613382214

   You're both right about the behavior. The `.internal.selfref` attribute is 
removed and data.table self-heals like @jonkeane said,
   
   ```r
   > library(data.table)
   > dt_in <- data.table(x = 1:10)
   > attributes(dt_in)
   $names
   [1] "x"
   
   $row.names
    [1]  1  2  3  4  5  6  7  8  9 10
   
   $class
   [1] "data.table" "data.frame"
   
   $.internal.selfref
   <pointer: 0x13b821ae0>
   > arrow::write_parquet(dt_in, "test.parquet")
   > dt_out <- read_parquet("test.parquet")
   > attributes(dt_out)
   $names
   [1] "x"
   
   $row.names
    [1]  1  2  3  4  5  6  7  8  9 10
   
   $class
   [1] "data.table" "data.frame"
   > setDT(dt_out)
   > attributes(dt_out)
   $names
   [1] "x"
   
   $row.names
    [1]  1  2  3  4  5  6  7  8  9 10
   
   $class
   [1] "data.table" "data.frame"
   
   $.internal.selfref
   <pointer: 0x13b821ae0>
   ```
   
   It doesn't make sense to me how the `.internal.selfref` pointer is the same 
on both sides though.


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