@Test
  public void testDuplicateColumnNameOrder() throws SQLException {
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT 1 AS a, 2 AS a from " + tableName);
    assertTrue(rs.next());
    assertEquals(1, rs.getInt("a"));
    rs.close();
    stmt.close();
  }
Validate error on closed resultset
@throws SQLException
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java