[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/11267 --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user shivaram commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-195134060 Thanks @yanboliang -- Sorry for the delay in looking at this. I think this looks good. Merging to master --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-187001699 Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/51656/ Test PASSed. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-187001694 Merged build finished. Test PASSed. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-187001455 **[Test build #51656 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51656/consoleFull)** for PR 11267 at commit [`6e78f7c`](https://github.com/apache/spark/commit/6e78f7c4a6145a5be57b1133555b8a4172d90129). * This patch passes all tests. * This patch merges cleanly. * This patch adds no public classes. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186995268 **[Test build #51656 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51656/consoleFull)** for PR 11267 at commit [`6e78f7c`](https://github.com/apache/spark/commit/6e78f7c4a6145a5be57b1133555b8a4172d90129). --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user yanboliang commented on a diff in the pull request: https://github.com/apache/spark/pull/11267#discussion_r53583948 --- Diff: R/pkg/R/functions.R --- @@ -536,15 +536,27 @@ setMethod("factorial", #' #' Aggregate function: returns the first value in a group. #' +#' The function by default returns the first values it sees. It will return the first non-NA +#' value it sees when ignoreNAs is set to true. If all values are NA, then NA is returned. +#' #' @rdname first #' @name first #' @family agg_funcs #' @export -#' @examples \dontrun{first(df$c)} +#' @examples +#' \dontrun{ +#' first(df$c) +#' first(df$c, TRUE) +#' } setMethod("first", - signature(x = "Column"), - function(x) { -jc <- callJStatic("org.apache.spark.sql.functions", "first", x@jc) + signature(x = "characterOrColumn"), + function(x, ignoreNAs = FALSE) { --- End diff -- Make sense, I will update. Thanks! --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user yanboliang commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186993289 @shivaram Several R packages have similar function such as [first](http://www.inside-r.org/packages/cran/pastecs/docs/first), [aggregate](http://www.inside-r.org/r-doc/stats/aggregate), etc. Users need this feature in R and did some [workaround](http://stackoverflow.com/questions/28799753/how-to-select-the-last-one-test-without-na-in-r). --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user felixcheung commented on a diff in the pull request: https://github.com/apache/spark/pull/11267#discussion_r53573356 --- Diff: R/pkg/R/functions.R --- @@ -536,15 +536,27 @@ setMethod("factorial", #' #' Aggregate function: returns the first value in a group. #' +#' The function by default returns the first values it sees. It will return the first non-NA +#' value it sees when ignoreNAs is set to true. If all values are NA, then NA is returned. +#' #' @rdname first #' @name first #' @family agg_funcs #' @export -#' @examples \dontrun{first(df$c)} +#' @examples +#' \dontrun{ +#' first(df$c) +#' first(df$c, TRUE) +#' } setMethod("first", - signature(x = "Column"), - function(x) { -jc <- callJStatic("org.apache.spark.sql.functions", "first", x@jc) + signature(x = "characterOrColumn"), + function(x, ignoreNAs = FALSE) { --- End diff -- probably something like `na.rm=TRUE` would be more R like --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user shivaram commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186380904 Is this option used by base R / other R libraries like dplyr ? --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186134049 Test PASSed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/51546/ Test PASSed. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186134043 Merged build finished. Test PASSed. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186133714 **[Test build #51546 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51546/consoleFull)** for PR 11267 at commit [`a30bd4a`](https://github.com/apache/spark/commit/a30bd4a34699dcec6aff3437080fd02583482a93). * This patch passes all tests. * This patch merges cleanly. * This patch adds no public classes. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/11267#issuecomment-186124658 **[Test build #51546 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51546/consoleFull)** for PR 11267 at commit [`a30bd4a`](https://github.com/apache/spark/commit/a30bd4a34699dcec6aff3437080fd02583482a93). --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [SPARK-13389] [SparkR] SparkR support first/la...
GitHub user yanboliang opened a pull request: https://github.com/apache/spark/pull/11267 [SPARK-13389] [SparkR] SparkR support first/last with ignore NAs ## What changes were proposed in this pull request? SparkR support first/last with ignore NAs cc @sun-rui @felixcheung @shivaram ## How was the this patch tested? unit tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/yanboliang/spark spark-13389 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/11267.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #11267 commit a30bd4a34699dcec6aff3437080fd02583482a93 Author: Yanbo LiangDate: 2016-02-19T09:02:45Z SparkR support first/last with ignore NAs --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org