diff --git a/pkg/R/schema.R b/pkg/R/schema.R index 02adf0e8abf81..0a758f0cc671c 100644 --- a/pkg/R/schema.R +++ b/pkg/R/schema.R @@ -25,7 +25,7 @@ structType <- function(x, ...) { structType.jobj <- function(x) { obj <- structure(list(), class = "structType") obj$jobj <- x - obj$fields <- function() { lapply(callJMethod(x, "fields"), structField) } + obj$fields <- function() { lapply(callJMethod(obj$jobj, "fields"), structField) } obj }