Skip to content

Commit 2f6e88f

Browse files
huaxingaoFelix Cheung
authored andcommitted
[SPARK-26189][R] Fix unionAll doc in SparkR
## What changes were proposed in this pull request? Fix unionAll doc in SparkR ## How was this patch tested? Manually ran test Author: Huaxin Gao <huaxing@us.ibm.com> Closes #23161 from huaxingao/spark-26189.
1 parent 28d3374 commit 2f6e88f

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

R/pkg/R/DataFrame.R

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,13 +2730,25 @@ setMethod("union",
27302730
dataFrame(unioned)
27312731
})
27322732

2733-
#' Return a new SparkDataFrame containing the union of rows
2733+
#' Return a new SparkDataFrame containing the union of rows.
27342734
#'
2735-
#' This is an alias for `union`.
2735+
#' This is an alias for \code{union}.
27362736
#'
2737-
#' @rdname union
2738-
#' @name unionAll
2737+
#' @param x a SparkDataFrame.
2738+
#' @param y a SparkDataFrame.
2739+
#' @return A SparkDataFrame containing the result of the unionAll operation.
2740+
#' @family SparkDataFrame functions
27392741
#' @aliases unionAll,SparkDataFrame,SparkDataFrame-method
2742+
#' @rdname unionAll
2743+
#' @name unionAll
2744+
#' @seealso \link{union}
2745+
#' @examples
2746+
#'\dontrun{
2747+
#' sparkR.session()
2748+
#' df1 <- read.json(path)
2749+
#' df2 <- read.json(path2)
2750+
#' unionAllDF <- unionAll(df1, df2)
2751+
#' }
27402752
#' @note unionAll since 1.4.0
27412753
setMethod("unionAll",
27422754
signature(x = "SparkDataFrame", y = "SparkDataFrame"),

R/pkg/R/generics.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ setGeneric("toRDD", function(x) { standardGeneric("toRDD") })
631631
#' @rdname union
632632
setGeneric("union", function(x, y) { standardGeneric("union") })
633633

634-
#' @rdname union
634+
#' @rdname unionAll
635635
setGeneric("unionAll", function(x, y) { standardGeneric("unionAll") })
636636

637637
#' @rdname unionByName

0 commit comments

Comments
 (0)