Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/15054#discussion_r78802202 --- 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 -- Sure, will do it.
--- 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