imay commented on a change in pull request #2777: [Alter] Add more schema
change to varchar type
URL: https://github.com/apache/incubator-doris/pull/2777#discussion_r367736246
##########
File path: be/src/olap/types.h
##########
@@ -477,6 +477,11 @@ struct FieldTypeTraits<OLAP_FIELD_TYPE_FLOAT> : public
BaseFieldtypeTraits<OLAP_
*reinterpret_cast<CppType*>(buf) = value;
return OLAP_SUCCESS;
}
+ static std::string to_string(const void* src) {
+ char buf[1024] = {'\0'};
+ snprintf(buf, sizeof(buf), "%.10f", *reinterpret_cast<const
CppType*>(src));
Review comment:
Better use FloatToBuffer and DoubleToBuffer in
be/src/gutil/strings/numbers.h to unify our float->string output format
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]