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

chaow pushed a commit to branch cherry_pick_3118
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit e11f26bb14bcd43bacaebc1a7316dac8e698262f
Author: chaow <[email protected]>
AuthorDate: Tue May 18 09:46:09 2021 +0800

    cherry-pick #3118
---
 .../org/apache/iotdb/cluster/query/last/ClusterLastQueryExecutor.java    | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/cluster/src/main/java/org/apache/iotdb/cluster/query/last/ClusterLastQueryExecutor.java
 
b/cluster/src/main/java/org/apache/iotdb/cluster/query/last/ClusterLastQueryExecutor.java
index 8ebb31d..d5ec324 100644
--- 
a/cluster/src/main/java/org/apache/iotdb/cluster/query/last/ClusterLastQueryExecutor.java
+++ 
b/cluster/src/main/java/org/apache/iotdb/cluster/query/last/ClusterLastQueryExecutor.java
@@ -127,6 +127,7 @@ public class ClusterLastQueryExecutor extends 
LastQueryExecutor {
         List<Pair<Boolean, TimeValuePair>> timeValuePairs = groupFuture.get();
         for (int i = 0; i < timeValuePairs.size(); i++) {
           if (timeValuePairs.get(i) != null
+              && timeValuePairs.get(i).right != null
               && timeValuePairs.get(i).right.getTimestamp() > 
results.get(i).right.getTimestamp()) {
             results.get(i).right = timeValuePairs.get(i).right;
           }

Reply via email to