ulysses-you commented on a change in pull request #25198: [SPARK-28443][SQL] 
Spark sql add exception when create field type NullType
URL: https://github.com/apache/spark/pull/25198#discussion_r312056710
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
 ##########
 @@ -2516,4 +2516,13 @@ class HiveDDLSuite
       }
     }
   }
+
+  test("SPARK-28443: fail the DDL command if it creates a table with null-type 
columns") {
+    withTable("t") {
+      val e = intercept[AnalysisException]{
+        sql(s"CREATE TABLE t as SELECT NULL AS c")
 
 Review comment:
   Nested fields are tested in `CatalogSuite`. This UT is just to confirm that 
cannot using CTAS with `NullType`. I have not seen other place confirm this.

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