thisisnic commented on code in PR #12826:
URL: https://github.com/apache/arrow/pull/12826#discussion_r932678239


##########
r/R/dplyr-collect.R:
##########
@@ -107,6 +109,14 @@ implicit_schema <- function(.data) {
   .data <- ensure_group_vars(.data)
   old_schm <- .data$.data$schema
 
+  missing_fields <- .data$selected_columns[
+    setdiff(
+      names(.data$selected_columns),
+      names(old_schm)
+    )]
+
+  purrr::iwalk(missing_fields, ~if(.x$field_name == "__filename") old_schm <<- 
old_schm$AddField(0, field(.y, string())))

Review Comment:
   @nealrichardson Is there anything obvious I'm doing wrong here?



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