gengliangwang 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-547999191 I think the proposal is reasonable. If no values are provided, then handling it as null type makes sense. After https://github.com/apache/spark/pull/26107, we can't store string type into numeric type without explicit casting. So, if we want to insert an empty array into a column of `array<int>`, simply using value `array()` will fail the analysis check. Since Spark can insert null type to other types, the problem is resolved. But the concern is that we should we do with `map()`, should we make it `map<NullType, NullType>`?
---------------------------------------------------------------- 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]
