yiguolei commented on code in PR #17261:
URL: https://github.com/apache/doris/pull/17261#discussion_r1120980651
##########
be/src/exec/arrow/arrow_reader.cpp:
##########
@@ -199,48 +199,42 @@ ArrowFile::~ArrowFile() {
}
arrow::Status ArrowFile::Close() {
- if (_file != nullptr) {
- _file->close();
- delete _file;
- _file = nullptr;
- }
return arrow::Status::OK();
}
bool ArrowFile::closed() const {
- if (_file != nullptr) {
- return _file->closed();
- } else {
- return true;
- }
+ return _file_reader->closed();
}
arrow::Result<int64_t> ArrowFile::Read(int64_t nbytes, void* buffer) {
return ReadAt(_pos, nbytes, buffer);
}
arrow::Result<int64_t> ArrowFile::ReadAt(int64_t position, int64_t nbytes,
void* out) {
- int64_t reads = 0;
int64_t bytes_read = 0;
_pos = position;
- while (nbytes > 0) {
- Status result = _file->readat(_pos, nbytes, &reads, out);
+ int64_t total_reads = 0;
Review Comment:
Any difference between bytes_read and total_reads?
--
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]