@Test
  public void testIsDML() throws Exception {
    checkIsDML("SELECT * FROM test_db.test_table", false);
    checkIsDML("INSERT INTO test_db.test_table VALUES ('a', 'b')", true);
    checkIsDML("INSERT OVERWRITE TABLE test_db.test_table SELECT * FROM test_db.test_table", true);
    checkIsDML("UPDATE test_db.test_table SET t1 = 'c' WHERE t2 = 'd'", true);
    checkIsDML("DELETE FROM test_db.test_table WHERE t2 = 'asdf'", true);
    checkIsDML("MERGE INTO test_db.test_table AS target USING test_db.test_table AS source ON source.t1 = target" +
        ".t1 WHEN MATCHED THEN UPDATE SET t1 = 'a' WHEN NOT MATCHED THEN INSERT VALUES ('q', 'r')", true);
  }
Some unit tests expect the whole analyze process to run, which is the expected, preferred way.
@param sql the query to analyze
@param fullAnalyze whether to run the full analyze or just some parts of it
@return QueryProperties from the analyzer
ql/src/test/org/apache/hadoop/hive/ql/parse/TestQueryProperties.java