Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15054#discussion_r78792855
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala 
---
    @@ -95,15 +155,38 @@ class SQLViewSuite extends QueryTest with SQLTestUtils 
with TestHiveSingleton {
           e = intercept[AnalysisException] {
             sql(s"""LOAD DATA LOCAL INPATH "$testData" INTO TABLE $viewName""")
           }.getMessage
    -      assert(e.contains(s"Target table in LOAD DATA cannot be temporary: 
`$viewName`"))
    +      assert(e.contains(s"Operation not allowed: LOAD DATA on temporary 
tables: `$viewName`"))
     
           e = intercept[AnalysisException] {
             sql(s"TRUNCATE TABLE $viewName")
           }.getMessage
           assert(e.contains(s"Operation not allowed: TRUNCATE TABLE on 
temporary tables: `$viewName`"))
    +
    +      e = intercept[AnalysisException] {
    +        sql(s"SHOW CREATE TABLE $viewName")
    +      }.getMessage
    +      assert(e.contains(
    +        s"Operation not allowed: SHOW CREATE TABLE on temporary tables: 
`$viewName`"))
    +
    +      e = intercept[AnalysisException] {
    +        sql(s"SHOW PARTITIONS $viewName")
    +      }.getMessage
    +      assert(e.contains(s"Operation not allowed: SHOW PARTITIONS on 
temporary tables: `$viewName`"))
    +
    +      intercept[NoSuchTableException] {
    +        sql(s"ANALYZE TABLE $viewName COMPUTE STATISTICS")
    +      }
         }
       }
     
    +  private def createTempView(viewName: String): Unit = {
    --- End diff --
    
    hmm, do we really need this method? I think it's just a one line code, e.g. 
`spark.range(10).createTempView(...)`


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to