You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/04/01 08:02:35 UTC

[GitHub] [incubator-doris] yangzhg commented on a change in pull request #5554: Add fmt library to speed up mysql text result serialization

yangzhg commented on a change in pull request #5554:
URL: https://github.com/apache/incubator-doris/pull/5554#discussion_r603733903



##########
File path: be/src/util/mysql_row_buffer.cpp
##########
@@ -106,15 +118,7 @@ int MysqlRowBuffer::push_tinyint(int8_t data) {
         return ret;
     }
 
-    int length = snprintf(_pos + 1, MAX_TINYINT_WIDTH + 2, "%d", data);
-
-    if (length < 0) {
-        LOG(ERROR) << "snprintf failed. data = " << data;
-        return length;
-    }
-
-    int1store(_pos, length);
-    _pos += length + 1;
+    _pos = add_int(data, _pos);

Review comment:
       is this means the convert will always success ?




-- 
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:
users@infra.apache.org



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