Repository: spark
Updated Branches:
  refs/heads/branch-2.3 1d0d0a5fc -> 45761ceb2


[MINOR][R] Fix R lint failure

## What changes were proposed in this pull request?

The lint failure bugged me:

```R
R/SQLContext.R:715:97: style: Trailing whitespace is superfluous.
#'        file-based streaming data source. \code{timeZone} to indicate a 
timezone to be used to
                                                                                
                ^
tests/fulltests/test_streaming.R:239:45: style: Commas should always have a 
space after.
  expect_equal(times[order(times$eventTime),][1, 2], 2)
                                            ^
lintr checks failed.
```

and I actually saw 
https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-sbt-hadoop-2.6-ubuntu-test/500/console
 too. If I understood correctly, there is a try about moving to Unbuntu one.

## How was this patch tested?

Manually tested by `./dev/lint-r`:

```
...
lintr checks passed.
```

Author: hyukjinkwon <gurwls...@apache.org>

Closes #20879 from HyukjinKwon/minor-r-lint.

(cherry picked from commit 92e952557dbd8a170d66d615e25c6c6a8399dd43)
Signed-off-by: hyukjinkwon <gurwls...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/45761ceb
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/45761ceb
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/45761ceb

Branch: refs/heads/branch-2.3
Commit: 45761ceb241cdf48b858ff28034a049a0ac62ea3
Parents: 1d0d0a5
Author: hyukjinkwon <gurwls...@apache.org>
Authored: Fri Mar 23 21:01:07 2018 +0900
Committer: hyukjinkwon <gurwls...@apache.org>
Committed: Fri Mar 23 21:01:21 2018 +0900

----------------------------------------------------------------------
 R/pkg/R/SQLContext.R                   | 2 +-
 R/pkg/tests/fulltests/test_streaming.R | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/45761ceb/R/pkg/R/SQLContext.R
----------------------------------------------------------------------
diff --git a/R/pkg/R/SQLContext.R b/R/pkg/R/SQLContext.R
index 9d0a2d5..b8e6bb3 100644
--- a/R/pkg/R/SQLContext.R
+++ b/R/pkg/R/SQLContext.R
@@ -727,7 +727,7 @@ read.jdbc <- function(url, tableName,
 #' @param schema The data schema defined in structType or a DDL-formatted 
string, this is
 #'               required for file-based streaming data source
 #' @param ... additional external data source specific named options, for 
instance \code{path} for
-#'        file-based streaming data source. \code{timeZone} to indicate a 
timezone to be used to 
+#'        file-based streaming data source. \code{timeZone} to indicate a 
timezone to be used to
 #'        parse timestamps in the JSON/CSV data sources or partition values; 
If it isn't set, it
 #'        uses the default value, session local timezone.
 #' @return SparkDataFrame

http://git-wip-us.apache.org/repos/asf/spark/blob/45761ceb/R/pkg/tests/fulltests/test_streaming.R
----------------------------------------------------------------------
diff --git a/R/pkg/tests/fulltests/test_streaming.R 
b/R/pkg/tests/fulltests/test_streaming.R
index a354d50..bfb1a04 100644
--- a/R/pkg/tests/fulltests/test_streaming.R
+++ b/R/pkg/tests/fulltests/test_streaming.R
@@ -236,7 +236,7 @@ test_that("Watermark", {
 
   times <- collect(sql("SELECT * FROM times"))
   # looks like write timing can affect the first bucket; but it should be t
-  expect_equal(times[order(times$eventTime),][1, 2], 2)
+  expect_equal(times[order(times$eventTime), ][1, 2], 2)
 
   stopQuery(q)
   unlink(parquetPath)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to