@Test
  public void testResultSetShouldNotCloseStatement() throws SQLException {
    Statement stmt = con.createStatement();
    ResultSet res = stmt.executeQuery("select under_col from " + tableName + " limit 1");
    res.next();
    assertFalse(stmt.isClosed());
    assertFalse(((HiveStatement)stmt).isQueryClosed());
    res.close();
    assertFalse(stmt.isClosed());
    assertFalse(((HiveStatement)stmt).isQueryClosed()); // check HIVE-25203
    stmt.close();
    assertTrue(stmt.isClosed());
    assertTrue(((HiveStatement)stmt).isQueryClosed());
  }
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