amorynan commented on code in PR #15966:
URL: https://github.com/apache/doris/pull/15966#discussion_r1082016577
##########
be/src/olap/field.h:
##########
@@ -450,6 +451,29 @@ uint32_t Field::hash_code(const CellType& cell, uint32_t
seed) const {
return _type_info->hash_code(cell.cell_ptr(), seed);
}
+class MapField : public Field {
+public:
+ explicit MapField(const TabletColumn& column) : Field(column) {}
+
+ void consume(RowCursorCell* dst, const char* src, bool src_null, MemPool*
mem_pool,
+ ObjectPool* agg_pool) const override {
+ dst->set_is_null(src_null);
+ if (src_null) {
+ return;
+ }
+ _type_info->deep_copy(dst->mutable_cell_ptr(), src, mem_pool);
+ }
+
+ // make variable_ptr memory allocate to cell_ptr as MapValue
+ char* allocate_memory(char* cell_ptr, char* variable_ptr) const override {
+ return variable_ptr + _length;
+ }
+
+ size_t get_variable_len() const override {
+ return _length;
Review Comment:
_length just means variable for field , and here is row-based code ....
--
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]