This is an automated email from the ASF dual-hosted git repository. hui pushed a commit to branch lmh/limitPushDown in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 2192f6991d811dcc95dbbef88eda506f8ec23356 Author: Minghui Liu <[email protected]> AuthorDate: Wed Feb 8 11:34:14 2023 +0800 add limit check in hasNextXXX() --- .../iotdb/db/mpp/execution/operator/source/SeriesScanUtil.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/source/SeriesScanUtil.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/source/SeriesScanUtil.java index 6217b7a6d4..728548172e 100644 --- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/source/SeriesScanUtil.java +++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/source/SeriesScanUtil.java @@ -196,6 +196,9 @@ public class SeriesScanUtil { } public boolean hasNextFile() throws IOException { + if (!paginationController.hasCurLimit()) { + return false; + } if (!unSeqPageReaders.isEmpty() || firstPageReader != null @@ -271,6 +274,9 @@ public class SeriesScanUtil { * overlapped chunks are consumed */ public boolean hasNextChunk() throws IOException { + if (!paginationController.hasCurLimit()) { + return false; + } if (!unSeqPageReaders.isEmpty() || firstPageReader != null @@ -412,6 +418,9 @@ public class SeriesScanUtil { @SuppressWarnings("squid:S3776") // Suppress high Cognitive Complexity warning public boolean hasNextPage() throws IOException { + if (!paginationController.hasCurLimit()) { + return false; + } /* * has overlapped data before
