thisisnic commented on a change in pull request #10387: URL: https://github.com/apache/arrow/pull/10387#discussion_r644333487
########## File path: r/R/util.R ########## @@ -110,3 +110,11 @@ handle_embedded_nul_error <- function(e) { } stop(e) } + +is_writable_table <- function(x) { + inherits(x, c("data.frame", "ArrowTabular")) +} + +attr(is_writable_table, "fail") <- function(call, env){ + paste0(eval(substitute(substitute(y, env), list(y = call$x)))," is not an object of class 'data.frame', 'RecordBatch', or 'Table'.") Review comment: Ah, thanks, had got mixed up with something else you said, but makes sense now. Worked out a way of putting the object's class back into the error message so have pushed that change now, as well as the comment about what that attribute does. -- 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