You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2021/03/14 03:56:27 UTC

[iotdb] 01/02: modify the sequence of setTimeFilter

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

xiangweiwei pushed a commit to branch clusterQueryOpt
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 8a818c88c606f84494ceab17928aec7b93ff264f
Author: Alima777 <wx...@gmail.com>
AuthorDate: Fri Mar 12 20:52:55 2021 +0800

    modify the sequence of setTimeFilter
---
 .../apache/iotdb/db/query/reader/series/SeriesReaderByTimestamp.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReaderByTimestamp.java b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReaderByTimestamp.java
index 8f0b04d..7653219 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReaderByTimestamp.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReaderByTimestamp.java
@@ -70,8 +70,8 @@ public class SeriesReaderByTimestamp implements IReaderByTimestamp {
   public Object[] getValuesInTimestamps(long[] timestamp, int length) throws IOException {
     Object[] results = new Object[length];
     int timeIndex;
+    seriesReader.setTimeFilter(timestamp[0]);
     for (timeIndex = 0; timeIndex < length; timeIndex++) {
-      seriesReader.setTimeFilter(timestamp[0]);
       if ((batchData == null || !hasAvailableData(batchData, timestamp[timeIndex]))
           && !hasNext(timestamp[timeIndex])) {
         // there is no more data