Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17941#discussion_r115881192
  
    --- Diff: R/pkg/inst/tests/testthat/test_sparkSQL.R ---
    @@ -721,6 +721,16 @@ test_that(
       expect_true(dropTempView("dfView"))
     })
     
    +test_that(
    +  "createGlobalTempView() results in a queryable table and sql() results 
in a new DataFrame", {
    +  df <- read.json(jsonPath)
    +  createGlobalTempView(df, "global_table1")
    +  newdf <- sql("SELECT * FROM global_temp.global_table1 where name = 
'Michael'")
    +  expect_is(newdf, "SparkDataFrame")
    +  expect_equal(count(newdf), 1)
    +  expect_true(dropGlobalTempView("global_table1"))
    --- End diff --
    
    I found that global temp tables are now returned by `listTables`. (R is the 
same).
    ```
    scala> spark.range(10).createGlobalTempView("t1")
    
    scala> spark.catalog.tableExists("global_temp.t1")
    res8: Boolean = true
    
    scala> spark.catalog.listTables().show
    +----+--------+-----------+---------+-----------+
    |name|database|description|tableType|isTemporary|
    +----+--------+-----------+---------+-----------+
    +----+--------+-----------+---------+-----------+
    ```


---
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

Reply via email to