yiguolei commented on code in PR #8855:
URL: https://github.com/apache/incubator-doris/pull/8855#discussion_r850009044
##########
be/src/olap/rowset/bit_field_reader.cpp:
##########
@@ -30,40 +30,40 @@ BitFieldReader::~BitFieldReader() {
SAFE_DELETE(_byte_reader);
}
-OLAPStatus BitFieldReader::init() {
+Status BitFieldReader::init() {
if (nullptr == _byte_reader) {
_byte_reader = new (std::nothrow) RunLengthByteReader(_input);
if (nullptr == _byte_reader) {
OLAP_LOG_WARNING("fail to create RunLengthByteReader");
- return OLAP_ERR_MALLOC_ERROR;
+ return Status::OLAPInternalError(OLAP_ERR_MALLOC_ERROR);
}
}
- return OLAP_SUCCESS;
+ return Status::OK();
}
-OLAPStatus BitFieldReader::_read_byte() {
- OLAPStatus res = OLAP_SUCCESS;
+Status BitFieldReader::_read_byte() {
+ Status res = Status::OK();
if (_byte_reader->has_next()) {
- if (OLAP_SUCCESS != (res = _byte_reader->next(&_current))) {
+ if (!(res = _byte_reader->next(&_current))) {
Review Comment:
I suggest we do not modify logic here, it will make the refactor work very
difficult and may import bugs. For example, in this case, the res value maybe
used in the latter code.
--
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]