yiguolei commented on code in PR #54760:
URL: https://github.com/apache/doris/pull/54760#discussion_r2281111852


##########
be/src/util/to_string.h:
##########
@@ -99,49 +99,18 @@ inline int fast_to_buffer(T value, char* buffer) {
             end = buffer + neg_inf_str_len;
         }
     } else {
-        end = fmt::format_to(buffer, FMT_COMPILE("{}"), value);
+        if constexpr (std::is_same_v<T, float>) {
+            end = fmt::format_to(buffer, FMT_COMPILE("{:.{}g}"), value,

Review Comment:
   这个为什么要单独写?而不是调用to string?



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

Reply via email to