@Test
  public void testUpdateInMergeViolatesCheckConstraint() throws Exception {
    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_EXPLAIN_USER, false);

    runStatementOnDriver("insert into " + Table.TBL_CHECK_MERGE + "(name, age, gpa) values " +
            "('student1', 16, 2.0)", hiveConf);

    Throwable error = null;
    try {
      runStatementOnDriver("merge into " + Table.TBL_CHECK_MERGE +
              " using (select age from table_source) source\n" +
              "on source.age=table_check_merge.age\n" +
              "when matched then update set gpa=6", hiveConf);
    } catch (Throwable t) {
      error = t;
    }

    assertTrue(error instanceof DataConstraintViolationError);
    assertTrue(error.getMessage().contains("Either CHECK or NOT NULL constraint violated!"));
  }
this is to test differety types of Acid tables
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestConstraintsMerge.java