You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/11/27 07:15:49 UTC
(iotdb) branch ty/meituan created (now 811ba441051)
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a change to branch ty/meituan
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 811ba441051 Use min(limt, page size) as the init capacity of result block
This branch includes the following new commits:
new 811ba441051 Use min(limt, page size) as the init capacity of result block
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: Use min(limt, page size) as the init capacity of result block
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty/meituan
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 811ba441051fa68af226eaad3bc02a79179141b0
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Mon Nov 27 15:15:37 2023 +0800
Use min(limt, page size) as the init capacity of result block
---
.../iotdb/tsfile/read/reader/page/AlignedPageReader.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/AlignedPageReader.java b/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/AlignedPageReader.java
index 67058a9661f..f5d56777dea 100644
--- a/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/AlignedPageReader.java
+++ b/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/AlignedPageReader.java
@@ -420,6 +420,16 @@ public class AlignedPageReader implements IPageReader, IAlignedPageReader {
@Override
public void initTsBlockBuilder(List<TSDataType> dataTypes) {
- builder = new TsBlockBuilder((int) timePageReader.getStatistics().getCount(), dataTypes);
+ if (paginationController.hasCurLimit()) {
+ builder =
+ new TsBlockBuilder(
+ (int)
+ Math.min(
+ paginationController.getCurLimit(),
+ timePageReader.getStatistics().getCount()),
+ dataTypes);
+ } else {
+ builder = new TsBlockBuilder((int) timePageReader.getStatistics().getCount(), dataTypes);
+ }
}
}