ianmcook commented on a change in pull request #10327: URL: https://github.com/apache/arrow/pull/10327#discussion_r632797152
########## File path: r/R/expression.R ########## @@ -76,7 +76,15 @@ Expression <- R6Class("Expression", inherit = ArrowObject, public = list( ToString = function() compute___expr__ToString(self), - type = function(schema) compute___expr__type(self, schema), + schema = NULL, + bind = function(schema) self$schema <- schema, + type = function() { + if (is.null(self$schema)) { + stop("Must bind() expression to a schema before returning its type", call. = FALSE) + } + compute___expr__type(self, self$schema) + }, Review comment: As you can see, calling the `$bind()` R6 method doesn't actually call the `Bind()` C++ function; I attempted that at first but ran into some problems so switched to doing it like this. -- 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