@Test
  public void testResultNextAcidTable() throws Exception {
    Statement stmt = con.createStatement(TYPE_SCROLL_INSENSITIVE, CONCUR_READ_ONLY);
    try {
      stmt.execute("set " + ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + "=true");
      stmt.execute("set " + ConfVars.HIVE_TXN_MANAGER.varname +
              "=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager");
      stmt.execute("create table tbl (fld int) tblproperties(" +
              "'transactional'='true','transactional_properties'='insert_only')");
      stmt.execute("insert into tbl values (1)");
      stmt.execute("insert into tbl values (2)");
      stmt.execute("insert into tbl values (3)");
      ResultSet res = stmt.executeQuery("select * from tbl");
      assertNotNull(res);
      int numRows = 0;
      while (res.next()) {
        numRows++;
      }
      assertEquals(numRows, 3);
      res.beforeFirst();
      while (res.next()) {
        numRows--;
      }
      assertEquals(numRows, 0);
      stmt.execute("drop table tbl");
    } finally {
      stmt.execute("set " + ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + "=false");
      stmt.execute("set " + ConfVars.HIVE_TXN_MANAGER.varname +
              "=org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager");
      stmt.close();
    }
  }
Test {@link HiveStatement#executeAsync(String)} for an insert overwrite into a table
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java