private void generateInsertsWithMultipleSplits(int begin, int end, String tableName, String tempTableName,
        boolean insertOverwrite) throws Exception {
      StringBuffer sb = new StringBuffer();
      for (int i = begin; i < end; i++) {
        sb.append("('");
        sb.append(i);
        sb.append("','value");
        sb.append(i);
        sb.append("','this is some comment to increase the file size ");
        sb.append(i);
        sb.append("')");
        if (i < end - 1) {
          sb.append(",");
        }
      }
      executeStatementOnDriver("DROP TABLE IF EXISTS " + tempTableName, driver);
      executeStatementOnDriver(
          "CREATE EXTERNAL TABLE " + tempTableName + " (id string, value string, comment string) STORED AS TEXTFILE ",
          driver);
      executeStatementOnDriver("insert into " + tempTableName + " values " + sb.toString(), driver);
      if (insertOverwrite) {
        executeStatementOnDriver("insert overwrite table " + tableName + " select * from " + tempTableName, driver);
      } else {
        executeStatementOnDriver("insert into " + tableName + " select * from " + tempTableName, driver);
      }
    }
This method is for creating a non-bucketed table in which the data is distributed
into multiple splits. The initial data is 100 rows and it should be split into
multiple files, like bucket_000001, bucket_000002, ...
This is needed because the MINOR compactions had issues with tables like this. (HIVE-23763)
@param dbName
@param tblName
@param tempTblName
@param createDeletes
@param createInserts
@param insertOverwrite
@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorOnTezTest.java