This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch ty/TsfileAlignedQuery in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 5d4b4accb4683362fe3d85b800ce823548543bf1 Author: JackieTien97 <[email protected]> AuthorDate: Wed Jan 17 12:15:41 2024 +0800 Dicard all null row --- .../apache/iotdb/tsfile/read/reader/page/AlignedPageReader.java | 7 ++++++- 1 file changed, 6 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 5a4bd43aff6..b32a64cfdb9 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 @@ -101,6 +101,8 @@ public class AlignedPageReader implements IPageReader { timeIndex++; TsPrimitiveType[] v = new TsPrimitiveType[valueCount]; + // if all the sub sensors' value are null in current row, just discard it + boolean hasNotNullValues = false; for (int i = 0; i < valueCount; i++) { ValuePageReader pageReader = valuePageReaderList.get(i); if (pageReader != null) { @@ -110,9 +112,12 @@ public class AlignedPageReader implements IPageReader { v[i] = null; rowValues[i] = null; } + if (rowValues[i] != null) { + hasNotNullValues = true; + } } - if (satisfyRecordFilter(timestamp, rowValues)) { + if (hasNotNullValues && satisfyRecordFilter(timestamp, rowValues)) { pageData.putVector(timestamp, v); } }
