aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/testthat/test_sparkSQL.R
diff options
context:
space:
mode:
authorfelixcheung <felixcheung_m@hotmail.com>2016-01-03 20:53:35 +0530
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2016-01-03 20:53:35 +0530
commitc3d505602de2fd2361633f90e4fff7e041849e28 (patch)
treeff95f873c56186d6e9f3eb8c72f8528c32fbc9df /R/pkg/inst/tests/testthat/test_sparkSQL.R
parent6c5bbd628aaedb6efb44c15f816fea8fb600decc (diff)
downloadspark-c3d505602de2fd2361633f90e4fff7e041849e28.tar.gz
spark-c3d505602de2fd2361633f90e4fff7e041849e28.tar.bz2
spark-c3d505602de2fd2361633f90e4fff7e041849e28.zip
[SPARK-12327][SPARKR] fix code for lintr warning for commented code
shivaram Author: felixcheung <felixcheung_m@hotmail.com> Closes #10408 from felixcheung/rcodecomment.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_sparkSQL.R')
-rw-r--r--R/pkg/inst/tests/testthat/test_sparkSQL.R12
1 files changed, 8 insertions, 4 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index 7b508b860e..9e5d0ebf60 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -498,9 +498,11 @@ test_that("table() returns a new DataFrame", {
expect_equal(count(tabledf), 3)
dropTempTable(sqlContext, "table1")
+ # nolint start
# Test base::table is working
#a <- letters[1:3]
#expect_equal(class(table(a, sample(a))), "table")
+ # nolint end
})
test_that("toRDD() returns an RRDD", {
@@ -766,8 +768,10 @@ test_that("sample on a DataFrame", {
sampled3 <- sample_frac(df, FALSE, 0.1, 0) # set seed for predictable result
expect_true(count(sampled3) < 3)
+ # nolint start
# Test base::sample is working
#expect_equal(length(sample(1:12)), 12)
+ # nolint end
})
test_that("select operators", {
@@ -1052,8 +1056,8 @@ test_that("string operators", {
df2 <- createDataFrame(sqlContext, l2)
expect_equal(collect(select(df2, locate("aa", df2$a)))[1, 1], 1)
expect_equal(collect(select(df2, locate("aa", df2$a, 1)))[1, 1], 2)
- expect_equal(collect(select(df2, lpad(df2$a, 8, "#")))[1, 1], "###aaads")
- expect_equal(collect(select(df2, rpad(df2$a, 8, "#")))[1, 1], "aaads###")
+ expect_equal(collect(select(df2, lpad(df2$a, 8, "#")))[1, 1], "###aaads") # nolint
+ expect_equal(collect(select(df2, rpad(df2$a, 8, "#")))[1, 1], "aaads###") # nolint
l3 <- list(list(a = "a.b.c.d"))
df3 <- createDataFrame(sqlContext, l3)
@@ -1259,7 +1263,7 @@ test_that("filter() on a DataFrame", {
expect_equal(count(filtered6), 2)
# Test stats::filter is working
- #expect_true(is.ts(filter(1:100, rep(1, 3))))
+ #expect_true(is.ts(filter(1:100, rep(1, 3)))) # nolint
})
test_that("join() and merge() on a DataFrame", {
@@ -1659,7 +1663,7 @@ test_that("cov() and corr() on a DataFrame", {
expect_true(abs(result - 1.0) < 1e-12)
# Test stats::cov is working
- #expect_true(abs(max(cov(swiss)) - 1739.295) < 1e-3)
+ #expect_true(abs(max(cov(swiss)) - 1739.295) < 1e-3) # nolint
})
test_that("freqItems() on a DataFrame", {