worker24h commented on a change in pull request #1173: load data from Parquet
file (Issues #911)
URL: https://github.com/apache/incubator-doris/pull/1173#discussion_r285412746
##########
File path: be/src/exec/broker_reader.cpp
##########
@@ -156,24 +161,40 @@ Status BrokerReader::read(uint8_t* buf, size_t* buf_len,
bool* eof) {
if (response.opStatus.statusCode ==
TBrokerOperationStatusCode::END_OF_FILE) {
// read the end of broker's file
- *eof = _eof = true;
+ *bytes_read = 0;
return Status::OK;
} else if (response.opStatus.statusCode != TBrokerOperationStatusCode::OK)
{
std::stringstream ss;
- ss << "Read from broker failed, broker:" << broker_addr
+ ss << "Read from broker failed, broker:" << broker_addr
<< " failed:" << response.opStatus.message;
LOG(WARNING) << ss.str();
return Status(ss.str());
}
- *buf_len = response.data.size();
- memcpy(buf, response.data.data(), *buf_len);
- _cur_offset += *buf_len;
- *eof = false;
+ *bytes_read = response.data.size();
+ memcpy(out, response.data.data(), *bytes_read);
+ _cur_offset += *bytes_read;
Review comment:
Yes, it does'nt need. Because *bytes_read
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]