ulysses-you commented on a change in pull request #28833:
URL: https://github.com/apache/spark/pull/28833#discussion_r440601141



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DataTypeParserSuite.scala
##########
@@ -61,6 +61,7 @@ class DataTypeParserSuite extends SparkFunSuite {
   checkDataType("varchAr(20)", StringType)
   checkDataType("cHaR(27)", StringType)
   checkDataType("BINARY", BinaryType)
+  checkDataType("void", NullType)

Review comment:
       I don't know what is needed, in other word I don't know what is needed 
to be compatible with Hive. It may be the reason why this thing was left. 
   
   There are 2 different things between Spark and Hive.
   1. Hive support both table and view with `Void` type, like `create table t 
as select null as c`, `create view v as select null as c`. Spark doesn't 
support both.
   2. For null value type, Hive use `Void` and Spark use `NullType`
   
   As @cloud-fan said, we shouldn't support `NullType` for tables. But may 
compatible with Hive in some DDLs like `desc table`, `show create talbe` ?
   
   I think we should discuss what things to be compatible with Hive first and 
then move.




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



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

Reply via email to