cloud-fan commented on a change in pull request #27946: 
[SPARK-31181][SQL][TESTS] Remove the default value assumption on CREATE TABLE 
test cases
URL: https://github.com/apache/spark/pull/27946#discussion_r395017473
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala
 ##########
 @@ -844,18 +844,20 @@ class InsertSuite extends DataSourceTest with 
SharedSparkSession {
   }
 
   test("SPARK-29174 Support LOCAL in INSERT OVERWRITE DIRECTORY to data 
source") {
-    withTempPath { dir =>
-      val path = dir.toURI.getPath
-      sql(s"""create table tab1 ( a int) location '$path'""")
-      sql("insert into tab1 values(1)")
-      checkAnswer(sql("select * from tab1"), Seq(1).map(i => Row(i)))
-      sql("create table tab2 ( a int)")
-      sql("insert into tab2 values(2)")
-      checkAnswer(sql("select * from tab2"), Seq(2).map(i => Row(i)))
-      sql(s"""insert overwrite local directory '$path' using parquet select * 
from tab2""")
-      sql("refresh table tab1")
-      checkAnswer(sql("select * from tab1"), Seq(2).map(i => Row(i)))
+    withSQLConf(SQLConf.LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT_ENABLED.key -> 
"false") {
+      withTempPath { dir =>
+        val path = dir.toURI.getPath
+        sql(s"""create table tab1 ( a int) location '$path'""")
 
 Review comment:
   This is to test data source table, maybe just add USING?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to