@Category(ManualIT.class)
  @Test
  public void testRepeatedlyWriteAndDeletion() throws SQLException {
    int testNum = 19;
    try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
        Statement statement = connection.createStatement()) {
      statement.execute("drop database if exists test");
    }
    // repeat 100 times
    // each time write 10000 points and delete 1000 of them randomly
    int repetition = 100;
    Random random = new Random();

    for (int rep = 0; rep < repetition; rep++) {
      int fileNumMax = 100;
      int pointPerFile = 100;
      int deletionRange = 1000;
      long time = -1;

      try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
          Statement statement = connection.createStatement()) {

        statement.execute("create database if not exists test");
        statement.execute("use test");

        statement.execute(
            "create table if not exists table" + testNum + "(deviceId STRING TAG, s0 INT32 field)");

        for (int i = 1; i <= fileNumMax; i++) {
          for (int j = 0; j < pointPerFile; j++) {
            statement.execute(
                String.format(
                    "INSERT INTO test.table" + testNum + "(time, deviceId, s0) VALUES(%d,'d0',%d)",
                    time + 1,
                    time + 1));
            time++;
          }
          statement.execute("FLUSH");
        }

        int totalPointNum = fileNumMax * pointPerFile;
        long deletionStart = random.nextInt((int) time);
        long deletionEnd = Math.min(deletionStart + deletionRange, time);
        long pointDeleted = deletionEnd - deletionStart + 1;
        LOGGER.info("{}: deletion range [{}, {}]", rep, deletionStart, deletionEnd);

        statement.execute(
            "delete from test.table"
                + testNum
                + " where time >= "
                + deletionStart
                + " and time <= "
                + deletionEnd);

        // check the point count
        try (ResultSet set =
            statement.executeQuery(
                "select count(*) from table" + testNum + " where time < " + totalPointNum)) {
          assertTrue(set.next());
          long expectedCnt = totalPointNum - pointDeleted;
          if (expectedCnt != set.getLong(1)) {
            List<TimeRange> remainingRanges = collectDataRanges(statement, time, testNum);
            LOGGER.info("{}: Remaining ranges: {}", rep, remainingRanges);
            fail(
                String.format(
                    "Inconsistent number of points %d - %d", expectedCnt, set.getLong(1)));
          }
        }
      }
    }
  }
Should delete this case after the deletion value filter feature be implemented
integration-test/src/test/java/org/apache/iotdb/relational/it/db/it/IoTDBDeletionTableIT.java