maropu commented on a change in pull request #27521: [SPARK-29462][SQL] The 
data type of "array()" should be array<null>
URL: https://github.com/apache/spark/pull/27521#discussion_r377386840
 
 

 ##########
 File path: docs/sql-migration-guide.md
 ##########
 @@ -215,6 +215,8 @@ license: |
   For example `SELECT timestamp 'tomorrow';`.
 
   - Since Spark 3.0, the `size` function returns `NULL` for the `NULL` input. 
In Spark version 2.4 and earlier, this function gives `-1` for the same input. 
To restore the behavior before Spark 3.0, you can set 
`spark.sql.legacy.sizeOfNull` to `true`.
+  
+  - Since Spark 3.0, when `array` function is called without parameters, it 
returns an empty array with `NullType` data type. In Spark version 2.4 and 
earlier, it returns an empty array with string type.
 
 Review comment:
   Ur, keeping the legacy behaviour in the conf looks somewhat reasonable to me 
for hive users.

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