private void checkIsDML(String query, boolean expectedIsDML) throws Exception {
    // fullAnalyze=true: this unit test expects the whole SemanticAnalyzer.analyze to be run
    QueryProperties properties = analyze(query, true);
    Assert.assertEquals(expectedIsDML, QueryProperties.QueryType.DML.equals(properties.getQueryType()));
  }
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