romainfrancois commented on a change in pull request #10387:
URL: https://github.com/apache/arrow/pull/10387#discussion_r640381291



##########
File path: r/R/util.R
##########
@@ -110,3 +110,18 @@ handle_embedded_nul_error <- function(e) {
   }
   stop(e)
 }
+
+check_tabular <- function(x, format) {
+  if (!inherits(x, "ArrowTabular")) {
+    abort(
+      c(
+        paste0("Cannot write to ", format, "."),
+        x = paste0(
+          "`x` must be an object of class 'data.frame', 'RecordBatch', or 
'Table', not '",
+          class(x)[1],
+          "'"
+        )
+      )
+    )
+  }
+}

Review comment:
       ```suggestion
   }
   
   ```
   
   GitHub seems concerned that this does not have a newline. 
   
   Should this perhaps end with `invisible(x)` ? Probably not important with 
the current use case, but that would allow e.g. `do_something(check_tabular(x), 
...)`
   
   




-- 
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:
[email protected]


Reply via email to