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



##########
File path: r/R/schema.R
##########
@@ -121,7 +121,25 @@ Schema <- R6Class("Schema",
     Equals = function(other, check_metadata = FALSE, ...) {
       inherits(other, "Schema") && Schema__Equals(self, other, 
isTRUE(check_metadata))
     },
-    export_to_c = function(ptr) ExportSchema(self, ptr)
+    export_to_c = function(ptr) ExportSchema(self, ptr),
+    code = function() {
+      names <- self$names
+      codes <- map2(names, self$fields, function(name, field){
+        withCallingHandlers(
+          field$type$code(),
+          error = function(cnd) {
+            abort(
+              glue::glue('Error getting code for field "{name}"'),

Review comment:
       I think this (and the other one) might need to be a `paste()` as `glue` 
isn't a package we depend on currently.




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