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 2026/01/24 10:21:56 UTC

(iotdb) branch dev/1.3 updated: [to dev/1.3] fix last query bug #17072

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

jackietien pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new 86bfeadf64f [to dev/1.3] fix last query bug #17072
86bfeadf64f is described below

commit 86bfeadf64f6fe86cc3950011b9d66c529d357ba
Author: shuwenwei <55...@users.noreply.github.com>
AuthorDate: Sat Jan 24 18:21:49 2026 +0800

    [to dev/1.3] fix last query bug #17072
---
 .../execution/operator/process/last/LastQueryOperator.java          | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/LastQueryOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/LastQueryOperator.java
index dd41bbd7afa..d2389a00898 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/LastQueryOperator.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/LastQueryOperator.java
@@ -112,12 +112,10 @@ public class LastQueryOperator implements ProcessOperator {
         && !tsBlockBuilder.isFull()) {
       if (children.get(currentIndex).hasNextWithTimer()) {
         TsBlock tsBlock = children.get(currentIndex).nextWithTimer();
-        if (tsBlock == null) {
-          return null;
-        } else if (!tsBlock.isEmpty()) {
+        if (tsBlock != null && !tsBlock.isEmpty()) {
           LastQueryUtil.appendLastValue(tsBlockBuilder, tsBlock);
-          return null;
         }
+        return null;
       } else {
         children.get(currentIndex).close();
         children.set(currentIndex, null);