code: @Override
    public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException {
      assertState(OperationState.FINISHED);
      validateDefaultFetchOrientation(orientation);
      if (orientation.equals(FetchOrientation.FETCH_FIRST)) {
        rowSet.setStartOffset(0);
      }
      return rowSet.extractSubset((int)maxRows);
    }
docs: /* (non-Javadoc)
  @see org.apache.hive.service.cli.Operation#getNextRowSet(org.apache.hive.service.cli.FetchOrientation, long)