chaoyli commented on a change in pull request #764: Convert next_row interface
to next_block
URL: https://github.com/apache/incubator-doris/pull/764#discussion_r266703076
##########
File path: be/src/olap/rowset/alpha_rowset_reader.cpp
##########
@@ -54,65 +54,46 @@ OLAPStatus AlphaRowsetReader::init(RowsetReaderContext*
read_context) {
_dst_cursor = new(std::nothrow)RowCursor();
_dst_cursor->init(*(_current_read_context->tablet_schema));
OLAPStatus status = _init_column_datas(read_context);
- return status;
-}
-
-bool AlphaRowsetReader::has_next() {
- bool next_flag = false;
- for (int i = 0; i < _column_datas.size(); ++i) {
- auto& row_block = _row_blocks[i];
- if (row_block != nullptr) {
- if (row_block->has_remaining()) {
- next_flag = true;
- } else {
- OLAPStatus status = _get_next_block(i, &_row_blocks[i]);
- if (status == OLAP_ERR_DATA_EOF) {
- _row_blocks[i] = nullptr;
- continue;
- } else if (status != OLAP_SUCCESS) {
- LOG(WARNING) << "_get_next_block failed, status:" <<
status;
- return false;
- } else {
- if (_row_blocks[i] != nullptr &&
_row_blocks[i]->has_remaining()) {
- next_flag = true;
- }
- }
- }
+ if (!_is_cumulative_rowset) {
Review comment:
OK, I have add some comment to elaborate it.
----------------------------------------------------------------
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]