github-actions[bot] commented on code in PR #25921:
URL: https://github.com/apache/doris/pull/25921#discussion_r1372526327


##########
be/src/olap/olap_common.h:
##########
@@ -20,6 +20,7 @@
 #include <gen_cpp/Types_types.h>

Review Comment:
   warning: 'gen_cpp/Types_types.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <gen_cpp/Types_types.h>
            ^
   ```
   



##########
be/src/olap/olap_common.h:
##########
@@ -378,11 +379,16 @@
     int64_t mi = 0;
     int64_t lo = 0;
 
-    void init(const std::string& rowset_id_str) {
+    void init(std::string_view rowset_id_str) {
         // for new rowsetid its a 48 hex string
         // if the len < 48, then it is an old format rowset id
-        if (rowset_id_str.length() < 48) {
-            int64_t high = std::stol(rowset_id_str, nullptr, 10);
+        if (rowset_id_str.length() < 48) [[unlikely]] {

Review Comment:
   warning: 48 is a magic number; consider replacing it with a named constant 
[readability-magic-numbers]
   ```cpp
           if (rowset_id_str.length() < 48) [[unlikely]] {
                                        ^
   ```
   



-- 
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