ulysses-you commented on a change in pull request #25085: [SPARK-28313][SQL] 
Spark sql null type incompatible with hive void type
URL: https://github.com/apache/spark/pull/25085#discussion_r302787664
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
 ##########
 @@ -2516,4 +2516,26 @@ class HiveDDLSuite
       }
     }
   }
+
+  test("SPARK-28313: Spark sql null type incompatible with hive void type") {
+    val expectedMsg = "DataType void is not supported"
+    withTable("t") {
+      val e = intercept[AnalysisException] {
+        sql("create table t (a void)")
+      }.getMessage
+      assert(e.contains(expectedMsg))
+    }
+
+    withTable("t") {
+      sql("CREATE TABLE t AS SELECT NULL AS col ")
 
 Review comment:
   Throw a SparkException 'Cannot recognize hive type string: NULL'

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