public static final int compareKeyBasedOnColHint(CellComparator comparator,
    ExtendedCell nextIndexedCell, ExtendedCell currentCell, int foff, int flen, byte[] colHint,
    int coff, int clen, long ts, byte type) {
    int compare = comparator.compareRows(nextIndexedCell, currentCell);
    if (compare != 0) {
      return compare;
    }
    // If the column is not specified, the "minimum" key type appears the
    // latest in the sorted order, regardless of the timestamp. This is used
    // for specifying the last key/value in a given row, because there is no
    // "lexicographically last column" (it would be infinitely long). The
    // "maximum" key type does not need this behavior.
    if (
      nextIndexedCell.getFamilyLength() + nextIndexedCell.getQualifierLength() == 0
        && nextIndexedCell.getTypeByte() == KeyValue.Type.Minimum.getCode()
    ) {
      // left is "bigger", i.e. it appears later in the sorted order
      return 1;
    }
    if (flen + clen == 0 && type == KeyValue.Type.Minimum.getCode()) {
      return -1;
    }

    compare = comparator.compareFamilies(nextIndexedCell, currentCell);
    if (compare != 0) {
      return compare;
    }
    if (colHint == null) {
      compare = comparator.compareQualifiers(nextIndexedCell, currentCell);
    } else {
      compare = CellUtil.compareQualifiers(nextIndexedCell, colHint, coff, clen);
    }
    if (compare != 0) {
      return compare;
    }
    // Next compare timestamps.
    compare = comparator.compareTimestamps(nextIndexedCell.getTimestamp(), ts);
    if (compare != 0) {
      return compare;
    }

    // Compare types. Let the delete types sort ahead of puts; i.e. types
    // of higher numbers sort before those of lesser numbers. Maximum (255)
    // appears ahead of everything, and minimum (0) appears after
    // everything.
    return (0xff & type) - (0xff & nextIndexedCell.getTypeByte());
  }
Used to compare two cells based on the column hint provided. This is specifically used when we
need to optimize the seeks based on the next indexed key. This is an advanced usage API
specifically needed for some optimizations.
@param nextIndexedCell the next indexed cell
@param currentCell     the cell to be compared
@param foff            the family offset of the currentCell
@param flen            the family length of the currentCell
@param colHint         the column hint provided - could be null
@param coff            the offset of the column hint if provided, if not offset of the
                       currentCell's qualifier
@param clen            the length of the column hint if provided, if not length of the
                       currentCell's qualifier
@param ts              the timestamp to be seeked
@param type            the type to be seeked
@return an int based on the given column hint TODO : To be moved out of here because this is a
        special API used in scan optimization.
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java