@Override
  public void executeNonQueryStatement(String sql)
      throws IoTDBConnectionException, StatementExecutionException {
    String previousDB = database;
    String previousDialect = sqlDialect;
    defaultSessionConnection.executeNonQueryStatement(sql);
    if ((!Objects.equals(previousDB, database) || !Objects.equals(previousDialect, sqlDialect))
        && endPointToSessionConnection != null) {
      Iterator<Map.Entry<TEndPoint, SessionConnection>> iterator =
          endPointToSessionConnection.entrySet().iterator();
      while (iterator.hasNext()) {
        Map.Entry<TEndPoint, SessionConnection> entry = iterator.next();
        SessionConnection sessionConnection = entry.getValue();
        if (sessionConnection != defaultSessionConnection) {
          try {
            sessionConnection.executeNonQueryStatement(sql);
          } catch (Throwable t) {
            logger.warn("failed to execute '{}' for {}", sql, entry.getKey());
            iterator.remove();
          }
        }
      }
    }
  }
execute non query statement

@param sql non query statement
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java