jonkeane commented on a change in pull request #11645:
URL: https://github.com/apache/arrow/pull/11645#discussion_r745854134



##########
File path: r/R/schema.R
##########
@@ -157,6 +165,9 @@ Schema$create <- function(...) {
   .list <- list2(...)
   if (all(map_lgl(.list, ~ inherits(., "Field")))) {
     schema_(.list)
+  } else if (is.null(names(.list))) {
+    # If not supplied as fields, only other alternative is e.g.`a = int16()`
+    abort("Schema definitions must be supplied as field/data type or field 
name/data type pairs")
   } else {
     schema_(.fields(.list))
   }

Review comment:
       OH, yes absolutely (if it's not too much scope creep here!) that would 
be quite nice




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