MaxGekk opened a new pull request #26051: [SPARK-24640][SQL] Return `NULL` from 
`size(NULL)` by default
URL: https://github.com/apache/spark/pull/26051
 
 
   ### What changes were proposed in this pull request?
   Set the default value of the `spark.sql.legacy.sizeOfNull` config to 
`false`. That changes behavior of the `size()` function for `NULL`. The 
function will return `NULL` for `NULL` instead of `-1`. 
   
   ### Why are the changes needed?
   There is the agreement in the PR 
https://github.com/apache/spark/pull/21598#issuecomment-399695523 to change 
behavior in Spark 3.0.
   
   
   ### Does this PR introduce any user-facing change?
   Yes.
   Before:
   ```sql
   spark-sql> select size(NULL);
   -1
   ```
   After:
   ```sql
   spark-sql> select size(NULL);
   NULL
   ```
   
   
   ### How was this patch tested?
   By the `check outputs of expression examples` test in `SQLQuerySuite` which 
runs expression examples.
   

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