Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22732#discussion_r226156400
  
    --- Diff: docs/sql-programming-guide.md ---
    @@ -1978,6 +1978,7 @@ working with timestamps in `pandas_udf`s to get the 
best performance, see
       - Since Spark 2.4, empty strings are saved as quoted empty strings `""`. 
In version 2.3 and earlier, empty strings are equal to `null` values and do not 
reflect to any characters in saved CSV files. For example, the row of `"a", 
null, "", 1` was writted as `a,,,1`. Since Spark 2.4, the same row is saved as 
`a,,"",1`. To restore the previous behavior, set the CSV option `emptyValue` to 
empty (not quoted) string.  
       - Since Spark 2.4, The LOAD DATA command supports wildcard `?` and `*`, 
which match any one character, and zero or more characters, respectively. 
Example: `LOAD DATA INPATH '/tmp/folder*/'` or `LOAD DATA INPATH 
'/tmp/part-?'`. Special Characters like `space` also now work in paths. 
Example: `LOAD DATA INPATH '/tmp/folder name/'`.
       - In Spark version 2.3 and earlier, HAVING without GROUP BY is treated 
as WHERE. This means, `SELECT 1 FROM range(10) HAVING true` is executed as 
`SELECT 1 FROM range(10) WHERE true`  and returns 10 rows. This violates SQL 
standard, and has been fixed in Spark 2.4. Since Spark 2.4, HAVING without 
GROUP BY is treated as a global aggregate, which means `SELECT 1 FROM range(10) 
HAVING true` will return only one row. To restore the previous behavior, set 
`spark.sql.legacy.parser.havingWithoutGroupByAsWhere` to `true`.
    +  - Since Spark 2.4, use of the method `def udf(f: AnyRef, dataType: 
DataType): UserDefinedFunction` should not expect any automatic null handling 
of the input parameters, thus a null input of a Scala primitive type will be 
converted to the type's corresponding default value in the UDF. All other UDF 
declaration and registration methods remain the same behavior as before.
    --- End diff --
    
    yes, this fixes a bug introduced by a commit in 2.4


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to