@Test
  public void testMajorCompactionUpdateMissingColumnStatsOfPartition() throws Exception {
    executeStatementOnDriver("drop table if exists " + TABLE1, driver);
    executeStatementOnDriver("create table " + TABLE1 + "(a int, b varchar(128), c float) partitioned by (p string) " +
            "stored as orc TBLPROPERTIES ('transactional'='true')", driver);
    executeStatementOnDriver("insert into " + TABLE1 + "(a, b, c, p) values (1, 'one', 1.1, 'p1')", driver);
    executeStatementOnDriver("insert into " + TABLE1 + "(a, b, c, p) values (2, 'two', 2.2, 'p1')", driver);

    executeStatementOnDriver("delete from " + TABLE1 + " where a = 1", driver);

    CompactorTestUtil.runCompaction(conf, DB,  TABLE1 , CompactionType.MAJOR, true, "p=p1");
    CompactorTestUtil.runCleaner(conf);
    verifySuccessfulCompaction(1);

    org.apache.hadoop.hive.ql.metadata.Table table = Hive.get().getTable(DB, TABLE1);
    Partition partition = Hive.get().getPartition(table, new HashMap<String, String>() {{ put("p", "p1"); }});

    Assert.assertEquals(3, StatsSetupConst.getColumnsHavingStats(partition.getParameters()).size());
  }
Tests whether hive.llap.io.etl.skip.format config is handled properly whenever QueryCompactor#runCompactionQueries
is invoked.
@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCrudCompactorOnTez.java