private int linearSearchForward(int r, PTFPartition p, Object sortKey, int amt,
      Order order) throws HiveException {
    boolean isOrderDesc = order.equals(Order.DESC);
    Object rowVal = sortKey;
    while (r < p.size() && !isDistanceGreater(isOrderDesc ? sortKey : rowVal,
        isOrderDesc ? rowVal : sortKey, amt)) {
      Pair<Integer, Object> stepResult = skipOrStepForward(r, p);
      r = stepResult.getLeft();
      rowVal = stepResult.getRight();
    }
    return r;
  }
Checks if the values of v1 or v2 are the same.
@return True if both values are the same or both are nulls.
ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/ValueBoundaryScanner.java