Github user falaki commented on a diff in the pull request: https://github.com/apache/spark/pull/11336#discussion_r82888061 --- Diff: R/pkg/R/column.R --- @@ -32,35 +34,65 @@ setOldClass("jobj") #' @export #' @note Column since 1.4.0 setClass("Column", - slots = list(jc = "jobj")) + slots = list(jc = "jobj", df = "SparkDataFrameOrNull")) #' A set of operations working with SparkDataFrame columns #' @rdname columnfunctions #' @name columnfunctions NULL - -setMethod("initialize", "Column", function(.Object, jc) { +setMethod("initialize", "Column", function(.Object, jc, df) { .Object@jc <- jc + + # Some Column objects don't have any referencing DataFrame. In such case, df will be NULL. + if (missing(df)) { + df <- NULL + } + .Object@df <- df .Object }) +setMethod("show", signature = "Column", definition = function(object) { --- End diff -- Maybe this can be implemented as `head` with default number of elements?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org