@Override
  public RangeResponse isWriteIdRangeValid(long minWriteId, long maxWriteId) {
    // check the easy cases first
    if (minWriteId > highWatermark) {
      return RangeResponse.NONE;
    } else if (exceptions.length > 0 && exceptions[0] > maxWriteId) {
      return RangeResponse.ALL;
    }

    // since the exceptions and the range in question overlap, count the
    // exceptions in the range
    long count = Math.max(0, maxWriteId - highWatermark);
    for(long txn: exceptions) {
      if (minWriteId <= txn && txn <= maxWriteId) {
        count += 1;
      }
    }

    if (count == 0) {
      return RangeResponse.ALL;
    } else if (count == (maxWriteId - minWriteId + 1)) {
      return RangeResponse.NONE;
    } else {
      return RangeResponse.SOME;
    }
  }
We cannot use a base file if its range contains an open write id.
@param writeId from base_xxxx
storage-api/src/java/org/apache/hadoop/hive/common/ValidReaderWriteIdList.java