Skip to content

Commit 59e6783

Browse files
committed
Keep empty TsBlock schema assertions
1 parent efe975f commit 59e6783

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/OffsetOperatorTest.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
import java.util.concurrent.TimeUnit;
6666

6767
import static org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext.createFragmentInstanceContext;
68-
import static org.apache.iotdb.db.queryengine.execution.operator.OperatorTestUtils.isNullOrEmpty;
6968
import static org.apache.iotdb.db.queryengine.execution.operator.OperatorTestUtils.nextNonNull;
7069
import static org.junit.Assert.assertEquals;
7170
import static org.junit.Assert.assertTrue;
@@ -385,7 +384,13 @@ public void batchTest3() throws Exception {
385384

386385
while (offsetOperator.isBlocked().isDone() && offsetOperator.hasNext()) {
387386
TsBlock tsBlock = offsetOperator.next();
388-
if (isNullOrEmpty(tsBlock)) {
387+
if (tsBlock == null) {
388+
continue;
389+
}
390+
assertEquals(2, tsBlock.getValueColumnCount());
391+
assertTrue(tsBlock.getColumn(0) instanceof IntColumn);
392+
assertTrue(tsBlock.getColumn(1) instanceof IntColumn);
393+
if (tsBlock.getPositionCount() == 0) {
389394
continue;
390395
}
391396
fail("Expected no data from offset operator");
@@ -477,7 +482,13 @@ public void batchTest4() throws Exception {
477482

478483
while (offsetOperator.isBlocked().isDone() && offsetOperator.hasNext()) {
479484
TsBlock tsBlock = offsetOperator.next();
480-
if (isNullOrEmpty(tsBlock)) {
485+
if (tsBlock == null) {
486+
continue;
487+
}
488+
assertEquals(2, tsBlock.getValueColumnCount());
489+
assertTrue(tsBlock.getColumn(0) instanceof IntColumn);
490+
assertTrue(tsBlock.getColumn(1) instanceof IntColumn);
491+
if (tsBlock.getPositionCount() == 0) {
481492
continue;
482493
}
483494
fail("Expected no data from offset operator");

0 commit comments

Comments
 (0)