chaoyli commented on a change in pull request #729: Fix memory problem of reader
URL: https://github.com/apache/incubator-doris/pull/729#discussion_r264505950
 
 

 ##########
 File path: be/src/olap/rowset/alpha_rowset_reader.cpp
 ##########
 @@ -190,35 +191,32 @@ OLAPStatus 
AlphaRowsetReader::_get_next_row_for_singleton_rowset(RowCursor** row
     }
     *row = min_row;
     _row_blocks[min_index]->pos_inc();
-    if (!_row_blocks[min_index]->has_remaining()) {
-        OLAPStatus status = _get_next_block(min_index, 
&_row_blocks[min_index]);
-        if (status == OLAP_ERR_DATA_EOF) {
-            _row_blocks[min_index] = nullptr;
-            return OLAP_SUCCESS;
-        } else if (status != OLAP_SUCCESS) {
-            LOG(WARNING) << "_get_next_block failed, status:" << status;
-            return status;
-        }
-    }
     return OLAP_SUCCESS;
 }
 
 OLAPStatus AlphaRowsetReader::_get_next_row_for_cumulative_rowset(RowCursor** 
row) {
     size_t pos = 0;
-    (*row) = new RowCursor();
-    (*row)->init(_segment_groups[0]->get_tablet_schema());
-    OLAPStatus status = _get_next_not_filtered_row(pos, row);
-    _row_blocks[pos]->pos_inc();
+    RowCursor* current_row = _row_cursors[pos];
+    OLAPStatus status = OLAP_SUCCESS;
     if (!_row_blocks[pos]->has_remaining()) {
-        OLAPStatus status = _get_next_block(pos, &_row_blocks[pos]);
+        status = _get_next_block(pos, &_row_blocks[pos]);
 
 Review comment:
   OLAP_ERR_DATA_EOF indicates _row_blocks[pos] is nullptr or not

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

Reply via email to