nealrichardson commented on a change in pull request #9092:
URL: https://github.com/apache/arrow/pull/9092#discussion_r551483818



##########
File path: r/R/record-batch.R
##########
@@ -274,6 +274,12 @@ as.data.frame.RecordBatch <- function(x, row.names = NULL, 
optional = FALSE, ...
 }
 
 .serialize_arrow_r_metadata <- function(x) {
+  # drop problems attributes (most likely from readr)
+  if ("attributes" %in% names(x) &&
+      "problems" %in% names(x[["attributes"]]) ) {
+    x[["attributes"]][["problems"]] <- NULL
+  }
+

Review comment:
       I believe you can safely just
   ```suggestion
     x[["attributes"]][["problems"]] <- NULL
   ```
   
   ```
   > x <- list()
   > x
   list()
   > x$attributes$problems <- NULL
   > x
   list()
   > x[["attributes"]][["problems"]] <- NULL
   > x
   list()
   ```
   




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