Github user merlintang commented on a diff in the pull request: https://github.com/apache/spark/pull/15819#discussion_r94351862 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala --- @@ -216,5 +218,37 @@ class VersionsSuite extends SparkFunSuite with Logging { "as 'COMPACT' WITH DEFERRED REBUILD") client.reset() } + + test(s"$version: CREATE TABLE AS SELECT") { + withTable("tbl") { + sqlContext.sql("CREATE TABLE tbl AS SELECT 1 AS a") + assert(sqlContext.table("tbl").collect().toSeq == Seq(Row(1))) + } + } + + test(s"$version: Delete the temporary staging directory and files after each insert") { + withTempDir { tmpDir => + withTable("tab", "tbl") { + sqlContext.sql( + s""" + |CREATE TABLE tab(c1 string) + |location '${tmpDir.toURI.toString}' + """.stripMargin) + + sqlContext.sql("CREATE TABLE tbl AS SELECT 1 AS a") --- End diff -- does the temporary view supported in the 1.6.x? I just used the hivecontext to create the view, but it does not work. because this is small test case, the created table here would be ok. please advise. thanks so much, Tao.
--- 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