This is an automated email from the ASF dual-hosted git repository.
jt2594838 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 5f968335e12 Fix SingleDeviceViewOperatorTest row assertion (#17995)
5f968335e12 is described below
commit 5f968335e12041bd65285662063e87c3540a0beb
Author: Caideyipi <[email protected]>
AuthorDate: Mon Jun 22 17:32:14 2026 +0800
Fix SingleDeviceViewOperatorTest row assertion (#17995)
---
.../execution/operator/SingleDeviceViewOperatorTest.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/SingleDeviceViewOperatorTest.java
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/SingleDeviceViewOperatorTest.java
index f88cdef3e2b..f4681cabe8c 100644
---
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/SingleDeviceViewOperatorTest.java
+++
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/SingleDeviceViewOperatorTest.java
@@ -171,16 +171,14 @@ public class SingleDeviceViewOperatorTest {
Arrays.asList(1, 2),
Arrays.asList(TSDataType.TEXT, TSDataType.INT32,
TSDataType.INT32, TSDataType.INT32));
int count = 0;
- int total = 0;
while (singleDeviceViewOperator.isBlocked().isDone() &&
singleDeviceViewOperator.hasNext()) {
TsBlock tsBlock = singleDeviceViewOperator.next();
if (tsBlock == null || tsBlock.isEmpty()) {
continue;
}
assertEquals(4, tsBlock.getValueColumnCount());
- total += tsBlock.getPositionCount();
- for (int i = 0; i < tsBlock.getPositionCount(); i++) {
- long expectedTime = i + 20L * (count % 25);
+ for (int i = 0; i < tsBlock.getPositionCount(); i++, count++) {
+ long expectedTime = count;
assertEquals(expectedTime, tsBlock.getTimeByIndex(i));
assertEquals(
SINGLE_DEVICE_MERGE_OPERATOR_TEST_SG + ".device0",
@@ -201,9 +199,8 @@ public class SingleDeviceViewOperatorTest {
assertTrue(tsBlock.getColumn(3).isNull(i));
}
}
- count++;
}
- assertEquals(500, total);
+ assertEquals(500, count);
} catch (Exception e) {
e.printStackTrace();
fail();