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 2022/05/06 02:24:06 UTC
[iotdb] branch pushdownlimit0.13 created (now feaf875f83)
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a change to branch pushdownlimit0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at feaf875f83 push down limit to rawdatasetwithValueFilter
This branch includes the following new commits:
new feaf875f83 push down limit to rawdatasetwithValueFilter
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: push down limit to rawdatasetwithValueFilter
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a commit to branch pushdownlimit0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit feaf875f83a89e19c5da18d9c933d0ea478d2fb8
Author: Alima777 <wx...@gmail.com>
AuthorDate: Fri May 6 10:23:41 2022 +0800
push down limit to rawdatasetwithValueFilter
---
.../iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java
index 2f5ac52671..744bec341b 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java
@@ -185,11 +185,11 @@ public class RawQueryDataSetWithValueFilter extends QueryDataSet implements IUDF
private boolean cacheRowInObjects() throws IOException {
int cachedTimeCnt = 0;
- long[] cachedTimeArray = new long[fetchSize];
+ int timeArraySize = rowLimit > 0 ? Math.min(fetchSize, rowLimit + rowOffset) : fetchSize;
+ long[] cachedTimeArray = new long[timeArraySize];
- // TODO: LIMIT constraint
// 1. fill time array from time Generator
- while (timeGenerator.hasNext() && cachedTimeCnt < fetchSize) {
+ while (timeGenerator.hasNext() && cachedTimeCnt < timeArraySize) {
cachedTimeArray[cachedTimeCnt++] = timeGenerator.next();
}
if (cachedTimeCnt == 0) {