@Override
  public boolean execute(String sql) throws SQLException {
    sql = sql.trim();
    boolean result = writeStatement.execute(sql);
    // if 'use XXXX' or 'set sql_dialect', sendRequest to all statements
    if (isUseDatabase(sql) || isSetSqlDialect(sql)) {
      for (Statement readStatement : readStatements) {
        boolean tmp = readStatement.execute(sql);
        result = result && tmp;
      }
    }
    return result;
  }
The implementation of {@link ClusterTestStatement} in cluster test.
integration-test/src/main/java/org/apache/iotdb/itbase/runtime/ClusterTestStatement.java