HappenLee commented on code in PR #38296:
URL: https://github.com/apache/doris/pull/38296#discussion_r1711316318


##########
be/src/vec/functions/function_regexp.cpp:
##########
@@ -277,6 +277,101 @@ struct RegexpExtractImpl {
     }
 };
 
+// To be compatible with presto.
+// The function is same as RegexpExtract, except that it returns null when no 
match is found.

Review Comment:
   no need copy the code怂you should use template <bool return_null>to do the 
work
   ```
   static constexpr auto name = return_null ? "regexp_extract_or_null" : 
"regexp_extract"
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to