HappenLee commented on code in PR #33124:
URL: https://github.com/apache/doris/pull/33124#discussion_r1554852194


##########
be/src/vec/data_types/serde/data_type_decimal_serde.h:
##########
@@ -154,10 +154,10 @@ template <typename T>
 Status DataTypeDecimalSerDe<T>::read_column_from_pb(IColumn& column, const 
PValues& arg) const {
     if constexpr (std::is_same_v<T, Decimal<Int128>> || std::is_same_v<T, 
Decimal128V3> ||
                   std::is_same_v<T, Decimal256> || std::is_same_v<T, 
Decimal<Int32>>) {
-        column.resize(arg.bytes_value_size());
+        column.reserve(arg.bytes_value_size());

Review Comment:
   why change reserve and call emplace_back?



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