You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2022/07/06 08:05:26 UTC

[iotdb] 01/01: Revert "fix SchemaQueryMergeOperator#next return null (#6592)"

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

zyk pushed a commit to branch revert-6592-test
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit b1838858ec79f0ce75a95f31d10618c6d8e860d2
Author: Marcos_Zyk <38...@users.noreply.github.com>
AuthorDate: Wed Jul 6 16:05:19 2022 +0800

    Revert "fix SchemaQueryMergeOperator#next return null (#6592)"
    
    This reverts commit 9adaa84fad239daae319b6b6c41262cf3c05435d.
---
 .../execution/operator/schema/SchemaQueryMergeOperator.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/schema/SchemaQueryMergeOperator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/schema/SchemaQueryMergeOperator.java
index 4902d36fe0..519cdce27e 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/schema/SchemaQueryMergeOperator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/schema/SchemaQueryMergeOperator.java
@@ -51,14 +51,16 @@ public class SchemaQueryMergeOperator implements ProcessOperator {
 
   @Override
   public TsBlock next() {
-    return children.get(currentIndex).next();
+    if (children.get(currentIndex).hasNext()) {
+      return children.get(currentIndex).next();
+    } else {
+      currentIndex++;
+      return null;
+    }
   }
 
   @Override
   public boolean hasNext() {
-    while (currentIndex < children.size() && !children.get(currentIndex).hasNext()) {
-      currentIndex++;
-    }
     return currentIndex < children.size();
   }