code: protected void validateFetchOrientation(FetchOrientation orientation,
        EnumSet<FetchOrientation> supportedOrientations) throws HiveSQLException {
      if (!supportedOrientations.contains(orientation)) {
        throw new HiveSQLException("The fetch type " + orientation.toString() +
            " is not supported for this resultset", "HY106");
      }
    }
docs: Verify if the given fetch orientation is part of the supported orientation types.
  @param orientation
  @param supportedOrientations
  @throws HiveSQLException