imay commented on a change in pull request #923: Fix concat_ws return null when
argument is null
URL: https://github.com/apache/incubator-doris/pull/923#discussion_r275231010
##########
File path: be/src/exprs/string_functions.cpp
##########
@@ -516,17 +516,17 @@ StringVal StringFunctions::concat_ws(
return strs[0];
}
- if (strs[0].is_null) {
+ if (strs[0].is_null && 0 == sep.len) {
Review comment:
NULL is different with empty string.
For NULL, this function return NULL; for empty string, return NOT NULL
you can reference
https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_concat-ws
----------------------------------------------------------------
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]