HangyuanLiu commented on a change in pull request #2911: Support not_empty function and empty function URL: https://github.com/apache/incubator-doris/pull/2911#discussion_r379821918
########## File path: be/src/exprs/string_functions.cpp ########## @@ -99,6 +99,32 @@ BooleanVal StringFunctions::ends_with( return BooleanVal(str_sp.ends_with(suffix_sp)); } +BooleanVal StringFunctions::empty( + FunctionContext* context, const StringVal& str) { + if (str.is_null) { + return BooleanVal::null(); Review comment: Considered non-empty if it contains at least one byte, even if this is a space or a null byte. The function should return true or false, not null. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org