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_r379821578
##########
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();
+ }
+ if (str.len == 0) {
+ return 1;
+ }
Review comment:
```suggestion
} else {
```
----------------------------------------------------------------
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]