public static void executeQueriesInBatchNoCount(DatabaseProduct dbProduct, Statement stmt, List<String> queries, int batchSize) throws SQLException {
    if (dbProduct.isORACLE()) {
      int queryCounter = 0;
      StringBuilder sb = new StringBuilder();
      sb.append("begin ");
      for (String query : queries) {
        LOG.debug("Adding query to batch: <" + query + ">");
        queryCounter++;
        sb.append(query).append(";");
        if (queryCounter % batchSize == 0) {
          sb.append("end;");
          String batch = sb.toString();
          LOG.debug("Going to execute queries in oracle anonymous statement. {}", batch);
          stmt.execute(batch);
          sb.setLength(0);
          sb.append("begin ");
        }
      }
      if (queryCounter % batchSize != 0) {
        sb.append("end;");
        String batch = sb.toString();
        LOG.debug("Going to execute queries in oracle anonymous statement. {}", batch);
        stmt.execute(batch);
      }
    } else {
      executeQueriesInBatch(stmt, queries, batchSize);
    }
  }
Calls queries in batch, but does not return affected row numbers. Same as executeQueriesInBatch,
with the only difference when the db is Oracle. In this case it is called as an anonymous stored
procedure instead of batching, since batching is not optimized. See:
https://docs.oracle.com/cd/E11882_01/java.112/e16548/oraperf.htm#JJDBC28752
@param dbProduct The type of the db which is used
@param stmt Statement which will be used for batching and execution.
@param queries List of sql queries to execute in a Statement batch.
@param batchSize maximum number of queries in a single batch
@throws SQLException Thrown if an execution error occurs.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java