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

    https://github.com/apache/spark/pull/10309#discussion_r47738072
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -1575,6 +1575,36 @@ setMethod("where",
                 filter(x, condition)
               })
     
    +#' dropDuplicates
    +#'
    +#' Returns a new DataFrame with duplicate rows removed, considering only
    +#' the subset of columns.
    +#'
    +#' @param x A DataFrame.
    +#' @param colnames A character vector of column names.
    +#' @return A DataFrame with duplicate rows removed.
    +#' @family DataFrame functions
    +#' @rdname dropduplicates
    +#' @name dropDuplicates
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' sc <- sparkR.init()
    +#' sqlContext <- sparkRSQL.init(sc)
    +#' path <- "path/to/file.json"
    +#' df <- read.json(sqlContext, path)
    +#' dropDuplicates(df)
    +#' dropDuplicates(df, c("col1", "col2"))
    +#' }
    +setMethod("dropDuplicates",
    +          signature(x = "DataFrame"),
    --- End diff --
    
    was there a concern with generic conflict? why not add colNames = 
"character" to the signature?


---
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