Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10094#discussion_r46878238
  
    --- Diff: R/pkg/R/WindowSpec.R ---
    @@ -0,0 +1,178 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# WindowSpec.R - WindowSpec class and methods implemented in S4 OO classes
    +
    +#' @include generics.R jobj.R column.R
    +
    +#' @title S4 class that represents a WindowSpec
    +#' @description WindowSpec can be created by using Window.partitionBy()
    +#'              or Window.orderBy()
    +#' @rdname WindowSpec
    +#' @seealso window
    +#'
    +#' @param sws A Java object reference to the backing Scala WindowSpec
    +#' @export
    +setClass("WindowSpec",
    +         slots = list(sws = "jobj"))
    +
    +setMethod("initialize", "WindowSpec", function(.Object, sws) {
    +  .Object@sws <- sws
    +  .Object
    +})
    +
    +windowSpec <- function(sws) {
    +  stopifnot(class(sws) == "jobj")
    +  new("WindowSpec", sws)
    +}
    +
    +#' @rdname show
    +setMethod("show", "WindowSpec",
    +          function(object) {
    +            cat("WindowSpec", callJMethod(object@sws, "toString"), "\n")
    +          })
    +
    +#' partitionBy
    +#'
    +#' Defines the partitioning columns in a WindowSpec.
    +#'
    +#' @param x a WindowSpec
    --- End diff --
    
    roxygen2 requires it - if missing it would try to infer it. I think it is 
better to be explicit and also it would be consistent everywhere we have it.
    But yes, it's optional: 
https://github.com/klutometis/roxygen/blob/3af98f2ca64cbbf2f2735ab4ef590b3fc39042ad/R/roclet-rd.R#L90


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to