@Test
  public void testStandardInsertIntoTable() throws ParseException {
    ASTNode ast = parse("INSERT into TABLE page_view SELECT pvs.viewTime, pvs.userid from page_view_stg pvs where pvs.userid is null");
    Assert.assertEquals("AST doesn't match",
      "(tok_query " +
        "(tok_from " +
          "(tok_tabref (tok_tabname page_view_stg) pvs)) " +
        "(tok_insert (tok_insert_into (tok_tab (tok_tabname page_view))) " +
        "(tok_select " +
          "(tok_selexpr (. (tok_table_or_col pvs) viewtime)) " +
          "(tok_selexpr (. (tok_table_or_col pvs) userid))) " +
        "(tok_where (tok_function isnull (. (tok_table_or_col pvs) userid)))))",
      ast.toStringTree());
  }
various Parser tests for INSERT/UPDATE/DELETE
parser/src/test/org/apache/hadoop/hive/ql/parse/TestIUD.java