HyukjinKwon commented on a change in pull request #24176: [SPARK-27233] [SQL]DF 
schema should match with table schema when converted to table
URL: https://github.com/apache/spark/pull/24176#discussion_r268386903
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
 ##########
 @@ -3014,6 +3014,15 @@ class SQLQuerySuite extends QueryTest with 
SharedSQLContext {
       sql("reset")
     }
   }
+
+  test("SPARK-27233 match schema when DF is converted to table") {
+    withTable("testSchema") {
+      val df = Seq(Some(Seq(1L, 2L, 3L)), None).toDF("seq")
+      df.write.format("parquet").saveAsTable("testSchema")
+      val res = sqlContext.table("testSchema")
 
 Review comment:
   Not a big deal but let's use spark sessions(not SQL context) next time in 
the test.

----------------------------------------------------------------
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