@Test
  public void testMajorCompactionOnBaseMissingBucket() throws Exception {
    dropTables("full_acid", "ext");
    HiveConf hiveConf = driver.getConf();
    String reducers = hiveConf.get("mapreduce.job.reduces");
    hiveConf.set("mapreduce.job.reduces", "7");
    executeStatementOnDriver("create table ext (a int)", driver);
    executeStatementOnDriver("insert into table ext values(1),(2),(3),(3),(3),(3),(4),(5),(6),(7)", driver);
    executeStatementOnDriver("create table full_acid(a int) stored as orc tblproperties('transactional'='true')", driver);
    executeStatementOnDriver("insert overwrite table full_acid select * from ext where a  = 3", driver);
    executeStatementOnDriver("insert into table full_acid select * from ext where a != 3 group by a", driver);

    List<Integer> values1 = new ArrayList<>();
    List<Integer> values2 = new ArrayList<>();
    executeStatementOnDriver("select * from full_acid order by a", driver);
    driver.getResults(values1);
    executeStatementOnDriver("alter table full_acid compact 'major'", driver);
    Assert.assertEquals(10, values1.size());

    runWorker(conf);
    executeStatementOnDriver("select * from full_acid order by a", driver);
    driver.getResults(values2);
    Assert.assertEquals(values1, values2);

    hiveConf.set("mapreduce.job.reduces", reducers);
    dropTables("full_acid", "ext");
  }
Tests compaction of tables that were populated by LOAD DATA INPATH statements.

In this scenario original ORC files are a structured in the following way:
comp3
|--delta_0000001_0000001_0000
   |--000000_0
|--delta_0000002_0000002_0000
   |--000000_0
   |--000001_0

..where comp3 table is not bucketed.

@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java