@Override
  public boolean execute(String sql) throws SQLException {
    runAsyncOnServer(sql);
    TGetOperationStatusResp status = waitForOperationToComplete();

    // The query should be completed by now
    if (!status.isHasResultSet() && stmtHandle.isPresent() && !stmtHandle.get().isHasResultSet()) {
      return false;
    }
    resultSet = new HiveQueryResultSet.Builder(this).setClient(client)
        .setStmtHandle(stmtHandle.get()).setMaxRows(maxRows).setFetchSize(fetchSize)
        .setConnection(connection).setFetchThreads(fetchThreads)
        .setScrollable(isScrollableResultset)
        .build();
    return true;
  }
Invalid OperationHandle is a special case in HS2, which sometimes could be considered as safe to ignore.
For instance: if the client retried due to HIVE-24786, and the retried operation happened to be the
closeOperation, we don't care as the query might have already been removed from HS2's scope.
@return true, if the response from server contains "Invalid OperationHandle"
jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java