thisisnic commented on a change in pull request #10261:
URL: https://github.com/apache/arrow/pull/10261#discussion_r627989698



##########
File path: r/R/record-batch.R
##########
@@ -148,13 +148,20 @@ RecordBatch$create <- function(..., schema = NULL) {
   if (length(arrays) == 1 && inherits(arrays[[1]], c("raw", "Buffer", 
"InputStream", "Message"))) {
     return(RecordBatch$from_message(arrays[[1]], schema))
   }
+  
   # Else, list of arrays
   # making sure there are always names
   if (is.null(names(arrays))) {
     names(arrays) <- rep_len("", length(arrays))
   }
   stopifnot(length(arrays) > 0)
 
+  # Preserve any grouping

Review comment:
       When I was testing it, it needed to be below that bit which gives it an 
empty character as a name instead of being `NULL`, otherwise the call to 
`RecordBatch__from_arrays` raises the following error: `Error in 
RecordBatch__from_arrays(schema, arrays) :   STRING_ELT() can only be applied 
to a 'character vector', not a 'NULL'`




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