Skip to content

Commit

Permalink
Merge branch 'master' into lir_instr
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengruifeng authored Jan 9, 2017
2 parents c8693d8 + 3ccabdf commit e6b4615
Show file tree
Hide file tree
Showing 167 changed files with 6,531 additions and 4,123 deletions.
10 changes: 8 additions & 2 deletions R/pkg/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: SparkR
Type: Package
Version: 2.1.0
Version: 2.2.0
Title: R Frontend for Apache Spark
Description: The SparkR package provides an R Frontend for Apache Spark.
Authors@R: c(person("Shivaram", "Venkataraman", role = c("aut", "cre"),
Expand Down Expand Up @@ -41,7 +41,13 @@ Collate:
'functions.R'
'install.R'
'jvm.R'
'mllib.R'
'mllib_classification.R'
'mllib_clustering.R'
'mllib_recommendation.R'
'mllib_regression.R'
'mllib_stat.R'
'mllib_tree.R'
'mllib_utils.R'
'serialize.R'
'sparkR.R'
'stats.R'
Expand Down
19 changes: 11 additions & 8 deletions R/pkg/R/DataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -2313,9 +2313,9 @@ setMethod("dropDuplicates",
#' @param joinExpr (Optional) The expression used to perform the join. joinExpr must be a
#' Column expression. If joinExpr is omitted, the default, inner join is attempted and an error is
#' thrown if it would be a Cartesian Product. For Cartesian join, use crossJoin instead.
#' @param joinType The type of join to perform. The following join types are available:
#' 'inner', 'outer', 'full', 'fullouter', leftouter', 'left_outer', 'left',
#' 'right_outer', 'rightouter', 'right', and 'leftsemi'. The default joinType is "inner".
#' @param joinType The type of join to perform, default 'inner'.
#' Must be one of: 'inner', 'cross', 'outer', 'full', 'full_outer',
#' 'left', 'left_outer', 'right', 'right_outer', 'left_semi', or 'left_anti'.
#' @return A SparkDataFrame containing the result of the join operation.
#' @family SparkDataFrame functions
#' @aliases join,SparkDataFrame,SparkDataFrame-method
Expand Down Expand Up @@ -2344,15 +2344,18 @@ setMethod("join",
if (is.null(joinType)) {
sdf <- callJMethod(x@sdf, "join", y@sdf, joinExpr@jc)
} else {
if (joinType %in% c("inner", "outer", "full", "fullouter",
"leftouter", "left_outer", "left",
"rightouter", "right_outer", "right", "leftsemi")) {
if (joinType %in% c("inner", "cross",
"outer", "full", "fullouter", "full_outer",
"left", "leftouter", "left_outer",
"right", "rightouter", "right_outer",
"left_semi", "leftsemi", "left_anti", "leftanti")) {
joinType <- gsub("_", "", joinType)
sdf <- callJMethod(x@sdf, "join", y@sdf, joinExpr@jc, joinType)
} else {
stop("joinType must be one of the following types: ",
"'inner', 'outer', 'full', 'fullouter', 'leftouter', 'left_outer', 'left',
'rightouter', 'right_outer', 'right', 'leftsemi'")
"'inner', 'cross', 'outer', 'full', 'full_outer',",
"'left', 'left_outer', 'right', 'right_outer',",
"'left_semi', or 'left_anti'.")
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions R/pkg/R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -3150,7 +3150,8 @@ setMethod("cume_dist",
#' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking
#' sequence when there are ties. That is, if you were ranking a competition using dense_rank
#' and had three people tie for second place, you would say that all three were in second
#' place and that the next person came in third.
#' place and that the next person came in third. Rank would give me sequential numbers, making
#' the person that came in third place (after the ties) would register as coming in fifth.
#'
#' This is equivalent to the \code{DENSE_RANK} function in SQL.
#'
Expand Down Expand Up @@ -3321,10 +3322,11 @@ setMethod("percent_rank",
#'
#' Window function: returns the rank of rows within a window partition.
#'
#' The difference between rank and denseRank is that denseRank leaves no gaps in ranking
#' sequence when there are ties. That is, if you were ranking a competition using denseRank
#' The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking
#' sequence when there are ties. That is, if you were ranking a competition using dense_rank
#' and had three people tie for second place, you would say that all three were in second
#' place and that the next person came in third.
#' place and that the next person came in third. Rank would give me sequential numbers, making
#' the person that came in third place (after the ties) would register as coming in fifth.
#'
#' This is equivalent to the RANK function in SQL.
#'
Expand Down
Loading

0 comments on commit e6b4615

Please sign in to comment.