yiguolei commented on code in PR #10506: URL: https://github.com/apache/doris/pull/10506#discussion_r910758161
########## be/src/olap/rowset/segment_v2/rle_page.h: ########## @@ -254,6 +254,38 @@ class RlePageDecoder : public PageDecoder { return Status::OK(); }; + Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n, + vectorized::MutableColumnPtr& dst) override { + DCHECK(_parsed); + if (PREDICT_FALSE(*n == 0 || _cur_index >= _num_elements)) { + *n = 0; + return Status::OK(); + } + + auto total = *n; + bool result = false; + size_t read_count = 0; + CppType value; + for (size_t i = 0; i < total; ++i) { + ordinal_t ord = rowids[i] - page_first_ordinal; + if (UNLIKELY(ord >= _num_elements)) { + *n = read_count; + return Status::OK(); + } + + _rle_decoder.Skip(ord - _cur_index); + _cur_index = ord; + + result = _rle_decoder.Get(&value); + _cur_index++; Review Comment: Not sure it is right? -- 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