cloud-fan commented on a change in pull request #27542: [SPARK-30790]The
dataType of map() should be map<null,null>
URL: https://github.com/apache/spark/pull/27542#discussion_r378382513
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2007,12 +2007,13 @@ object SQLConf {
.booleanConf
.createWithDefault(false)
- val LEGACY_ARRAY_DEFAULT_TO_STRING =
- buildConf("spark.sql.legacy.arrayDefaultToStringType.enabled")
+ val LEGACY_CREATE_EMPTY_COLLECTION_USING_STRING_TYPE =
+ buildConf("spark.sql.legacy.createEmptyCollectionUsingStringType.enabled")
.internal()
- .doc("When set to true, it returns an empty array of string type when
the `array` " +
- "function is called without any parameters. Otherwise, it returns an
empty " +
- "array of `NullType`")
+ .doc("When set to true, it returns an empty array of string type and an
empty map with " +
Review comment:
let's match the migration guide:
```
When set to true, Spark returns an empty collection with `StringType` as
element type
if the `array`/`map` function is called without any parameters. Otherwise,
Spark returns
an empty collection with `NullType` as element type.
```
----------------------------------------------------------------
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]