aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/R/generics.R
diff options
context:
space:
mode:
authorDongjoon Hyun <dongjoon@apache.org>2016-06-20 11:12:41 -0700
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2016-06-20 11:12:41 -0700
commit9613424898fd2a586156bc4eb48e255749774f20 (patch)
tree937563432cb0a98bdbe8c3733af72222e96c21b5 /R/pkg/R/generics.R
parent5cfabec8724714b897d6e23e670c39e58f554ea2 (diff)
downloadspark-9613424898fd2a586156bc4eb48e255749774f20.tar.gz
spark-9613424898fd2a586156bc4eb48e255749774f20.tar.bz2
spark-9613424898fd2a586156bc4eb48e255749774f20.zip
[SPARK-16059][R] Add `monotonically_increasing_id` function in SparkR
## What changes were proposed in this pull request? This PR adds `monotonically_increasing_id` column function in SparkR for API parity. After this PR, SparkR supports the followings. ```r > df <- read.json("examples/src/main/resources/people.json") > collect(select(df, monotonically_increasing_id(), df$name, df$age)) monotonically_increasing_id() name age 1 0 Michael NA 2 1 Andy 30 3 2 Justin 19 ``` ## How was this patch tested? Pass the Jenkins tests (with added testcase). Author: Dongjoon Hyun <dongjoon@apache.org> Closes #13774 from dongjoon-hyun/SPARK-16059.
Diffstat (limited to 'R/pkg/R/generics.R')
-rw-r--r--R/pkg/R/generics.R5
1 files changed, 5 insertions, 0 deletions
diff --git a/R/pkg/R/generics.R b/R/pkg/R/generics.R
index 6e754afab6..37d05560c3 100644
--- a/R/pkg/R/generics.R
+++ b/R/pkg/R/generics.R
@@ -993,6 +993,11 @@ setGeneric("md5", function(x) { standardGeneric("md5") })
#' @export
setGeneric("minute", function(x) { standardGeneric("minute") })
+#' @rdname monotonically_increasing_id
+#' @export
+setGeneric("monotonically_increasing_id",
+ function(x) { standardGeneric("monotonically_increasing_id") })
+
#' @rdname month
#' @export
setGeneric("month", function(x) { standardGeneric("month") })