@Override
  public void createIndex(String indexName, String tableName, boolean isUnique,
                          String... columnNames) throws SQLException {
    if (!tableHasIndex(tableName, false, indexName)) {
      String query = dbmsHelper.getCreateIndexStatement(indexName, tableName, isUnique, columnNames);
      executeQuery(query);
    } else {
      LOG.info("Index {} already exist, skipping creation, table = {}", indexName, tableName);
    }
  }
Setting arguments for prepared statement

@param preparedStatement {@link PreparedStatement} object
@param arguments array of arguments

@throws SQLException
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java