morningman commented on a change in pull request #7939:
URL: https://github.com/apache/incubator-doris/pull/7939#discussion_r799307185
##########
File path: be/src/vec/data_types/data_type_number_base.cpp
##########
@@ -65,30 +65,40 @@ std::string DataTypeNumberBase<T>::to_string(const IColumn&
column, size_t row_n
}
}
+// binary: column num | value1 | value2 | ...
template <typename T>
-size_t DataTypeNumberBase<T>::serialize(const IColumn& column, PColumn*
pcolumn) const {
- const auto column_len = column.size();
- pcolumn->mutable_binary()->resize(column_len * sizeof(FieldType));
- auto* data = pcolumn->mutable_binary()->data();
+int64_t DataTypeNumberBase<T>::get_uncompressed_serialized_bytes(const
IColumn& column) const {
+ return sizeof(uint32_t) + column.size() * sizeof(FieldType);
+}
- // copy the data
+template <typename T>
+char* DataTypeNumberBase<T>::serialize(const IColumn& column, char* buf) const
{
+ // column num
+ const auto column_num = column.size();
Review comment:
`IColumn + DataType` to `serialized data + PColumnData`. So the `column
size` info is saved in `serialized data`
--
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]