@Test
  public void testNonPartitionedTable() throws Exception {
    AlterTableCompactDesc desc = parseAndAnalyzeAlterTable("alter table foo compact 'major'");
    Assert.assertEquals("major", desc.getCompactionType());
    Assert.assertEquals("default.foo", desc.getTableName());
  }
Tests for parsing and semantic analysis of ALTER TABLE ... compact.
ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBCompact.java