lingbin commented on a change in pull request #2422: Add copy_object() method
for HLL columns when loading
URL: https://github.com/apache/incubator-doris/pull/2422#discussion_r356440433
##########
File path: be/src/olap/row.h
##########
@@ -134,6 +134,19 @@ void copy_row(DstRowType* dst, const SrcRowType& src,
MemPool* pool) {
}
}
+// NOTE: only use in MemTable for now, it is same with copy_row(), but for HLL
and Object type,
+// its content is in Slice->data, other than a normal Slice, so we just assign
the Slice->data
+// pointer, instead of memcpy the data.
+// TODO(lingbin): remove this method
+template<typename DstRowType, typename SrcRowType>
+void copy_row_in_memtable(DstRowType* dst, const SrcRowType& src, MemPool*
pool) {
Review comment:
Since this method not only needs to copy the HLL type, but also all other
types. If templates are not used, then we need to implement a corresponding
copy_object () for all types. Moreover, if all types are handled in one method,
it means a bunch of switch-case statements. This way maybe more ugly.
----------------------------------------------------------------
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]