public boolean equalKey(long keyRefWord, byte[] keyBytes, int keyStart, int keyLength,
      WriteBuffers.Position readPos) {

    int storedKeyLength =
        (int) ((keyRefWord & SmallKeyLength.bitMask) >> SmallKeyLength.bitShift);
    boolean isKeyLengthSmall = (storedKeyLength != SmallKeyLength.allBitsOn);

    if (isKeyLengthSmall && storedKeyLength != keyLength) {
      return false;
    }
    long absoluteKeyOffset =
        (keyRefWord & AbsoluteKeyOffset.bitMask);

    writeBuffers.setReadPoint(absoluteKeyOffset, readPos);
    if (!isKeyLengthSmall) {
      // Read big value length we wrote with the value.
      storedKeyLength = writeBuffers.readVInt(readPos);
      if (storedKeyLength != keyLength) {
        return false;
      }
    }

    // Our reading is positioned to the key.
    if (!writeBuffers.isEqual(keyBytes, keyStart, readPos, keyLength)) {
      return false;
    }

    // LOG.debug("VectorMapJoinFastKeyStore equalKey match on bytes");
    return true;
  }
THIS METHOD IS NOT THREAD-SAFE. Use only at load time (or be mindful of thread safety).
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastKeyStore.java