yiguolei commented on code in PR #10016: URL: https://github.com/apache/incubator-doris/pull/10016#discussion_r893055475
########## be/src/olap/rowset/segment_v2/parsed_page.h: ########## @@ -67,17 +70,38 @@ struct ParsedPage { return Status::OK(); } - ~ParsedPage() { - delete data_decoder; - data_decoder = nullptr; + ParsedPage() = default; + + ParsedPage(const ParsedPage& other) { + page_handle = other.page_handle; + has_null = other.has_null; + null_decoder = other.null_decoder; + null_bitmap = other.null_bitmap; + other.data_decoder->clone_for_cache(data_decoder); + first_ordinal = other.first_ordinal; + num_rows = other.num_rows; + first_array_item_ordinal = other.first_array_item_ordinal; + page_pointer = other.page_pointer; + page_index = other.page_index; + offset_in_page = other.offset_in_page; } - PageHandle page_handle; + ParsedPage& operator=(ParsedPage&& other) { + this->~ParsedPage(); + new (this) ParsedPage(other); + return *this; + } + + ~ParsedPage() { data_decoder = nullptr; } + + size_t size() const { return sizeof(ParsedPage) + page_handle->data().size; } Review Comment: should also add chunk size in decoder? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org