private Statement generateStatement() {
    if (deletion.getStartTime() == Long.MIN_VALUE && deletion.getEndTime() == Long.MAX_VALUE) {
      return new DeleteTimeSeriesStatement(Collections.singletonList(deletion.getPath()));
    }
    DeleteDataStatement statement = new DeleteDataStatement();
    statement.setPathList(Collections.singletonList(deletion.getPath()));
    statement.setDeleteStartTime(deletion.getStartTime());
    statement.setDeleteEndTime(deletion.getEndTime());
    return statement;
  }
This loader is used to load deletion plan.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/DeletionLoader.java