@Override
  public void setMaxRows(int max) throws SQLException {
    checkConnection("setMaxRows");
    if (max < 0) {
      throw new SQLException("Maximum number of rows must be >= 0");
    }
    maxRows = max;
  }
Poll on the operation status, till the operation is complete. We want to ensure that since a
client might end up using executeAsync and then call this to check if the query run is
finished.
jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java