@Test
  public void mergeTest4() {
    SingleColumnMerger merger =
        new SingleColumnMerger(new InputLocation(0, 0), new DescTimeComparator());

    TsBlockBuilder inputBuilder = new TsBlockBuilder(Collections.singletonList(TSDataType.INT32));
    inputBuilder.getTimeColumnBuilder().writeLong(2);
    inputBuilder.getColumnBuilder(0).writeInt(20);
    inputBuilder.declarePosition();

    TsBlock[] inputTsBlocks = new TsBlock[] {inputBuilder.build()};
    int[] inputIndex = new int[] {0};
    int[] updatedInputIndex = new int[] {0};

    TsBlockBuilder builder = new TsBlockBuilder(Collections.singletonList(TSDataType.INT32));
    TimeColumnBuilder timeColumnBuilder = builder.getTimeColumnBuilder();
    timeColumnBuilder.writeLong(7);
    builder.declarePosition();
    timeColumnBuilder.writeLong(6);
    builder.declarePosition();
    timeColumnBuilder.writeLong(5);
    builder.declarePosition();
    timeColumnBuilder.writeLong(4);
    builder.declarePosition();
    ColumnBuilder valueColumnBuilder = builder.getColumnBuilder(0);

    merger.mergeColumn(
        inputTsBlocks, inputIndex, updatedInputIndex, timeColumnBuilder, 4, valueColumnBuilder);

    assertEquals(0, updatedInputIndex[0]);

    Column result = valueColumnBuilder.build();

    assertEquals(4, result.getPositionCount());
    assertTrue(result.isNull(0));
    assertTrue(result.isNull(1));
    assertTrue(result.isNull(2));
    assertTrue(result.isNull(3));
  }
current time of input tsblock is less than endTime of timeBuilder in desc order
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/SingleColumnMergerTest.java