@Override
  public MatchCode checkVersions(ExtendedCell cell, long timestamp, byte type, boolean ignoreCount)
    throws IOException {
    assert !PrivateCellUtil.isDelete(type);
    // We drop old version in #isDeleted, so here we won't SKIP because of versioning. But we should
    // consider TTL.
    if (ignoreCount) {
      return MatchCode.INCLUDE;
    }
    countCurrentCol++;
    if (timestamp < this.oldestStamp) {
      if (countCurrentCol == minVersions) {
        return MatchCode.INCLUDE_AND_SEEK_NEXT_COL;
      }
      if (countCurrentCol > minVersions) {
        // This may not be reached, only for safety.
        return MatchCode.SEEK_NEXT_COL;
      }
    }

    if (countCurrentCol == resultMaxVersions) {
      // We have enough number of versions for user's requirement.
      return MatchCode.INCLUDE_AND_SEEK_NEXT_COL;
    }
    if (countCurrentCol > resultMaxVersions) {
      // This may not be reached, only for safety
      return MatchCode.SEEK_NEXT_COL;
    }
    return MatchCode.INCLUDE;
  }
This method is not idempotent, we will save some info to judge VERSION_MASKED.
@param cell - current cell to check if deleted by a previously seen delete
@return We don't distinguish DeleteColumn and DeleteFamily. We only return code for column.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NewVersionBehaviorTracker.java