wangbo commented on code in PR #8855:
URL: https://github.com/apache/incubator-doris/pull/8855#discussion_r849446089


##########
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))) {
             return res;
         }
 
         _bits_left = 8;
     } else {
-        return OLAP_ERR_DATA_EOF;
+        return Status::OLAPInternalError(OLAP_ERR_DATA_EOF);
     }
 
-    return OLAP_SUCCESS;
+    return Status::OK();
 }
 
-OLAPStatus BitFieldReader::next(char* value) {
-    OLAPStatus res = OLAP_SUCCESS;
+Status BitFieldReader::next(char* value) {
+    Status res = Status::OK();
 
     if (0 == _bits_left) {
-        if (OLAP_SUCCESS != (res = _read_byte())) {
+        if (!(res = _read_byte())) {

Review Comment:
   ```suggestion
           if (_read_byte() != res) {
   ```



-- 
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

Reply via email to