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:17 UTC

[iotdb] branch IOTDB-3320 created (now 37d80dff2e)

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a change to branch IOTDB-3320
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 37d80dff2e [IOTDB-3320] Don't return data which are not satisfied with time filter in last query

This branch includes the following new commits:

     new 37d80dff2e [IOTDB-3320] Don't return data which are not satisfied with time filter in last query

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: [IOTDB-3320] Don't return data which are not satisfied with time filter in last query

Posted by ja...@apache.org.
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);