vinodkc commented on a change in pull request #32411: URL: https://github.com/apache/spark/pull/32411#discussion_r631758038
########## File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala ########## @@ -598,6 +598,38 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi } } + test("SPARK-28551: CTAS Hive Table should be with non-existent or empty location") { + def executeCTASWithNonEmptyLocation(tempLocation: String) { + sql(s"CREATE TABLE ctas1(id string) stored as rcfile LOCATION " + + s"'file:$tempLocation/ctas1'") + sql("INSERT INTO TABLE ctas1 SELECT 'A' ") + sql(s"CREATE TABLE ctas_with_existing_location stored as rcfile " + + s"LOCATION 'file:$tempLocation' " + + s"AS SELECT key k, value FROM src ORDER BY k, value") + } + + Seq("false", "true").foreach { convertCTASFlag => Review comment: withSQLConf accepts pairs of String (String, String), passing (String, Boolean) will fail to compile -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org