This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new e1dfec58e3 [IOTDB-3320] Don't return data which are not satisfied with
time filter in last query (#6068)
e1dfec58e3 is described below
commit e1dfec58e36a3f81cb06dbdf09e8cba1ef9b633c
Author: Jackie Tien <[email protected]>
AuthorDate: Mon May 30 16:29:24 2022 +0800
[IOTDB-3320] Don't return data which are not satisfied with time filter in
last query (#6068)
---
.../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);