watfordkcf commented on code in PR #42153:
URL: https://github.com/apache/spark/pull/42153#discussion_r1274915443
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -53,13 +53,17 @@ import org.apache.spark.unsafe.types.{ByteArray, UTF8String}
*/
// scalastyle:off line.size.limit
@ExpressionDescription(
- usage = "_FUNC_(sep[, str | array(str)]+) - Returns the concatenation of the
strings separated by `sep`.",
+ usage = "_FUNC_(sep[, str | array(str)]+) - Returns the concatenation of the
strings separated by `sep`, skipping null values.",
Review Comment:
Burying the lede makes it unexpected (similarly the documentation for 'comb'
and 'tomb' doesn't include that they are pronounced differently), also that
there is no symmetry between `concat` and `concat_ws` is equally unexpected:
```
spark-sql (default)> SELECT concat('a', null, 'b'), concat_ws('', 'a', null,
'b');
NULL ab
Time taken: 1.843 seconds, Fetched 1 row(s)
```
Coming from postgres (and even SQL Server) further added to the confusion:
```
-- SELECT concat('a', null, 'b'), concat_ws('', 'a', null, 'b')
concat | concat_ws
--------+-----------
ab | ab
(1 row)
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]