HappenLee commented on code in PR #9716:
URL: https://github.com/apache/incubator-doris/pull/9716#discussion_r878789019
##########
be/src/vec/functions/function_bitmap.cpp:
##########
@@ -45,17 +45,16 @@ struct ToBitmap {
auto size = offsets.size();
res.reserve(size);
for (size_t i = 0; i < size; ++i) {
+ res.emplace_back();
+
const char* raw_str = reinterpret_cast<const
char*>(&data[offsets[i - 1]]);
size_t str_size = offsets[i] - offsets[i - 1] - 1;
StringParser::ParseResult parse_result =
StringParser::PARSE_SUCCESS;
uint64_t int_value =
StringParser::string_to_unsigned_int<uint64_t>(raw_str, str_size,
&parse_result);
if (UNLIKELY(parse_result != StringParser::PARSE_SUCCESS)) {
Review Comment:
```suggestion
if (LIKELY(parse_result == StringParser::PARSE_SUCCESS)) {
res.back().add(int_value);
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]