Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22161#discussion_r211541767
  
    --- Diff: R/pkg/tests/fulltests/test_sparkSQL.R ---
    @@ -3640,17 +3640,18 @@ test_that("catalog APIs, listTables, listColumns, 
listFunctions", {
       expect_equal(colnames(c),
                    c("name", "description", "dataType", "nullable", 
"isPartition", "isBucket"))
       expect_equal(collect(c)[[1]][[1]], "speed")
    -  expect_error(listColumns("foo", "default"),
    -       "Error in listColumns : analysis error - Table 'foo' does not exist 
in database 'default'")
    +  expect_error(listColumns("zxwtyswklpf", "default"),
    +       paste("Error in listColumns : analysis error - Table",
    +             "'zxwtyswklpf' does not exist in database 'default'"))
     
       f <- listFunctions()
       expect_true(nrow(f) >= 200) # 250
       expect_equal(colnames(f),
                    c("name", "database", "description", "className", 
"isTemporary"))
       expect_equal(take(orderBy(f, "className"), 1)$className,
                    "org.apache.spark.sql.catalyst.expressions.Abs")
    -  expect_error(listFunctions("foo_db"),
    -               "Error in listFunctions : analysis error - Database 
'foo_db' does not exist")
    +  expect_error(listFunctions("zxwtyswklpf_db"),
    +        "Error in listFunctions : analysis error - Database 
'zxwtyswklpf_db' does not exist")
    --- End diff --
    
    I think the style below is more correct:
    
    ```R
    expect_error(listFunctions("zxwtyswklpf_db"),
                 "Error in ...
    ```


---

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

Reply via email to