Alima777 commented on a change in pull request #2859:
URL: https://github.com/apache/iotdb/pull/2859#discussion_r595966914



##########
File path: 
server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java
##########
@@ -64,102 +65,144 @@ public RawQueryDataSetWithValueFilter(
 
   @Override
   public boolean hasNextWithoutConstraint() throws IOException {
-    if (hasCachedRow) {
+    if (!cachedRowRecords.isEmpty()) {
       return true;
     }
-    return cacheRowRecord();
+    return cacheRowRecords();
   }
 
+  /** @return the first record of cached rows or null if there is no more data 
*/
   @Override
   public RowRecord nextWithoutConstraint() throws IOException {
-    if (!hasCachedRow && !cacheRowRecord()) {
+    if (cachedRowRecords.isEmpty() && !cacheRowRecords()) {
       return null;
     }
-    hasCachedRow = false;
-    return cachedRowRecord;
+
+    return cachedRowRecords.remove(0);

Review comment:
       It's my miss. I've fixed 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]


Reply via email to