SaintBacchus commented on code in PR #11046: URL: https://github.com/apache/doris/pull/11046#discussion_r926346121
########## be/src/exec/arrow/orc_reader.cpp: ########## @@ -52,6 +55,31 @@ Status ORCReaderWrap::init_reader(const TupleDescriptor* tuple_desc, return Status::EndOfFile("Empty Orc File"); } + int64_t row_number = 0; + int end_group = _total_groups; + for (int i = 0; i < _total_groups; i++) { + int64_t _offset = _reader->GetRawORCReader()->getStripe(i)->getOffset(); + int64_t row = _reader->GetRawORCReader()->getStripe(i)->getNumberOfRows(); + if (_offset < _range_start_offset) { + row_number += row; + } else if (_offset == _range_start_offset) { + _current_group = i; + } + if (_range_start_offset + _range_size <= _offset) { + end_group = i; + break; + } + } + LOG(INFO) << "This reader read orc file from offset: " << _range_start_offset + << " with size: " << _range_size << ". Also mean that read from strip id from " + << _current_group << " to " << end_group; + _total_groups = end_group; Review Comment: in the impl of arrow, `seek` function is just a value set. ``` Status Seek(int64_t row_number) { ARROW_RETURN_IF(row_number >= NumberOfRows(), Status::Invalid("Out of bounds row number: ", row_number)); current_row_ = row_number; return Status::OK(); } ``` -- 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