You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/12/07 10:55:57 UTC

[GitHub] [iotdb] JackieTien97 commented on a change in pull request #4534: [IOTDB-2102] Push down limit to ReadTask in RawDataSetWithoutValueFilter

JackieTien97 commented on a change in pull request #4534:
URL: https://github.com/apache/iotdb/pull/4534#discussion_r763875021



##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
##########
@@ -530,6 +560,10 @@ protected void fillCache(int seriesIndex) throws IOException, InterruptedExcepti
       synchronized (seriesReaderList.get(seriesIndex)) {
         // we only need to judge whether to submit another task when the queue is not full
         if (blockingQueueArray[seriesIndex].remainingCapacity() > 0) {
+          if (batchDataLengthList != null
+              && batchDataLengthList.get(seriesIndex) >= rowLimit + rowOffset) {
+            return;
+          }

Review comment:
       You can safely delete this `if` block. It seems that we don't need to do this judgement here, because we will set `hasRemaining` to false in sub thread.

##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
##########
@@ -58,12 +58,23 @@
     private final ManagedSeriesReader reader;
     private final String pathName;
     private final BlockingQueue<BatchData> blockingQueue;
+    private List<Integer> batchDataLengthList;

Review comment:
       use `int[]` instead of `List<Integer>`




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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org