[opt](function) refactor extract_url to use StringValue (#13508)

change extract_url use stringvalue to repalce std::string to speed up
This commit is contained in:
HappenLee
2022-10-21 08:33:39 +08:00
committed by GitHub
parent 3dd00df24b
commit e62d3dd8e5
6 changed files with 38 additions and 33 deletions

View File

@ -173,6 +173,9 @@ struct StringValue {
// Trims leading and trailing spaces.
StringValue trim() const;
// Find the first position char of appear, return -1 if not found
int64_t find_first_of(char c) const;
void to_string_val(doris_udf::StringVal* sv) const {
*sv = doris_udf::StringVal(reinterpret_cast<uint8_t*>(ptr), len);
}