HyukjinKwon edited a comment on issue #26324: [SPARK-29462] The data type of "array()" should be array<null> URL: https://github.com/apache/spark/pull/26324#issuecomment-553230428 Sorry, actually I think I have to revert this back for the reasons below: 1. per https://github.com/apache/spark/pull/26324#issuecomment-547999191 we should think about what to do with map type together. 2. Seems like null type coercion depends and some DBMSes don't event have null types. Hive has it but Hive case was `array<string>`. 3. In case of PostgreSQL seems it coerces NULL literal to TEXT type. 4. Using `null` as default type might cause a corner case as below. Should we add `void` as NullType? needs some investigations. ```sql CREATE TABLE weird_null USING JSON AS SELECT NULL AS null_col; SHOW CREATE TABLE weird_null ``` ``` CREATE TABLE `weird_null` (`null_col` NULL) USING JSON ``` ```sql CREATE TABLE `weird_null_1` (`null_col` NULL) USING JSON ``` ``` Error in SQL statement: ParseException: DataType null is not supported.(line 1, pos 40) == SQL == CREATE TABLE `weird_null_1` (`null_col` NULL) ------------------------- ``` 5. This PR basically means a revert of https://github.com/apache/spark/pull/18516#issuecomment-312765246 - let's don't make it complicated for now.
---------------------------------------------------------------- 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]
