You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/06/24 02:19:40 UTC

[doris] 04/04: BetaRowsetReader::next_block does not return 0 rows before eof (#10367)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit c35d1458c5f3a440b255645a64dce372e53e4e23
Author: Yongqiang YANG <98...@users.noreply.github.com>
AuthorDate: Fri Jun 24 07:22:45 2022 +0800

    BetaRowsetReader::next_block does not return 0 rows before eof (#10367)
---
 be/src/olap/rowset/beta_rowset_reader.cpp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/be/src/olap/rowset/beta_rowset_reader.cpp b/be/src/olap/rowset/beta_rowset_reader.cpp
index 89b150dca9..e314c4c1ab 100644
--- a/be/src/olap/rowset/beta_rowset_reader.cpp
+++ b/be/src/olap/rowset/beta_rowset_reader.cpp
@@ -188,15 +188,17 @@ OLAPStatus BetaRowsetReader::next_block(RowBlock** block) {
 OLAPStatus BetaRowsetReader::next_block(vectorized::Block* block) {
     SCOPED_RAW_TIMER(&_stats->block_fetch_ns);
     if (config::enable_storage_vectorization && _context->is_vec) {
-        auto s = _iterator->next_batch(block);
-        if (!s.ok()) {
-            if (s.is_end_of_file()) {
-                return OLAP_ERR_DATA_EOF;
-            } else {
-                LOG(WARNING) << "failed to read next block: " << s.to_string();
-                return OLAP_ERR_ROWSET_READ_FAILED;
+        do {
+            auto s = _iterator->next_batch(block);
+            if (!s.ok()) {
+                if (s.is_end_of_file()) {
+                    return OLAP_ERR_DATA_EOF;
+                } else {
+                    LOG(WARNING) << "failed to read next block: " << s.to_string();
+                    return OLAP_ERR_ROWSET_READ_FAILED;
+                }
             }
-        }
+        } while (block->rows() == 0);
     } else {
         bool is_first = true;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org