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 2022/05/30 07:15:18 UTC
[iotdb] 01/01: [IOTDB-3320] Don't return data which are not satisfied with time filter in last query
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch IOTDB-3320
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 37d80dff2e7affd6028801678adeb9c3fd42dc7a
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Mon May 30 15:15:03 2022 +0800
[IOTDB-3320] Don't return data which are not satisfied with time filter in last query
---
.../db/mpp/execution/operator/process/UpdateLastCacheOperator.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/UpdateLastCacheOperator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/UpdateLastCacheOperator.java
index 4ce473e62b..f2ec8c0cc8 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/UpdateLastCacheOperator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/UpdateLastCacheOperator.java
@@ -96,6 +96,11 @@ public class UpdateLastCacheOperator implements ProcessOperator {
checkArgument(res.getPositionCount() == 1, "last query result should only have one record");
+ // last value is null
+ if (res.getColumn(0).isNull(0)) {
+ return LAST_QUERY_EMPTY_TSBLOCK;
+ }
+
long lastTime = res.getColumn(0).getLong(0);
TsPrimitiveType lastValue = res.getColumn(1).getTsPrimitiveType(0);