@Test
  public void test2() throws ParseException {
    ASTNode
      ast = parse("MERGE INTO target USING source ON target.pk = source.pk WHEN MATCHED THEN DELETE");
    Assert.assertEquals(
      "(tok_merge " +
        "(tok_tabref (tok_tabname target)) (tok_tabref (tok_tabname source)) (= (. (tok_table_or_col target) pk) (. (tok_table_or_col source) pk)) " +
        "(tok_matched " +
        "tok_delete)" +
        ")", ast.toStringTree());
  }
Testing parsing for SQL Merge statement
parser/src/test/org/apache/hadoop/hive/ql/parse/TestMergeStatement.java