public static  void appendAlterTable(WarehouseInstance primary, String primaryDbName, String primaryDbNameExtra,
                                List<String> selectStmtList, List<String[]> expectedValues) throws Throwable {
    String tableName = "testAlterTable";
    String tableNameMM = tableName + "_MM";

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableName, null, false, OperationType.REPL_TEST_ACID_INSERT);
    primary.run("use " + primaryDbName)
            .run("alter table " + tableName + " change value value1 int ")
            .run("select value1 from " + tableName)
            .verifyResults(new String[]{"1", "2", "3", "4", "5"})
            .run("alter table " + tableName + "_nopart change value value1 int ")
            .run("select value1 from " + tableName + "_nopart")
            .verifyResults(new String[]{"1", "2", "3", "4", "5"});
    selectStmtList.add("select value1 from " + tableName );
    expectedValues.add(new String[]{"1", "2", "3", "4", "5"});
    selectStmtList.add("select value1 from " + tableName + "_nopart");
    expectedValues.add(new String[]{"1", "2", "3", "4", "5"});

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableNameMM, null, true, OperationType.REPL_TEST_ACID_INSERT);
    primary.run("use " + primaryDbName)
            .run("alter table " + tableNameMM + " change value value1 int ")
            .run("select value1 from " + tableNameMM)
            .verifyResults(new String[]{"1", "2", "3", "4", "5"})
            .run("alter table " + tableNameMM + "_nopart change value value1 int ")
            .run("select value1 from " + tableNameMM + "_nopart")
            .verifyResults(new String[]{"1", "2", "3", "4", "5"});
    selectStmtList.add("select value1 from " + tableNameMM );
    expectedValues.add(new String[]{"1", "2", "3", "4", "5"});
    selectStmtList.add("select value1 from " + tableNameMM + "_nopart");
    expectedValues.add(new String[]{"1", "2", "3", "4", "5"});
  }
ReplicationTestUtils - static helper functions for replication test
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java