public static SingleValueBoundaryScanner getBoundaryScanner(BoundaryDef start, BoundaryDef end,
      boolean nullsLast, OrderExpressionDef exprDef, PrimitiveCategory primitiveCategory)
      throws HiveException {
    switch (primitiveCategory) {
    case BYTE:
    case INT:
    case LONG:
    case SHORT:
      return new LongValueBoundaryScanner(start, end, exprDef, nullsLast);
    case TIMESTAMP:
      return new TimestampValueBoundaryScanner(start, end, exprDef, nullsLast);
    case TIMESTAMPLOCALTZ:
      return new TimestampLocalTZValueBoundaryScanner(start, end, exprDef, nullsLast);
    case DOUBLE:
    case FLOAT:
      return new DoubleValueBoundaryScanner(start, end, exprDef, nullsLast);
    case DECIMAL:
      return new HiveDecimalValueBoundaryScanner(start, end, exprDef, nullsLast);
    case DATE:
      return new DateValueBoundaryScanner(start, end, exprDef, nullsLast);
    case STRING:
      return new StringValueBoundaryScanner(start, end, exprDef, nullsLast);
    case CHAR:
      return new CharValueBoundaryScanner(start, end, exprDef, nullsLast);
    case VARCHAR:
      return new VarcharValueBoundaryScanner(start, end, exprDef, nullsLast);
    case BOOLEAN:
      return new BooleanValueBoundaryScanner(start, end, exprDef, nullsLast);
    default:
      throw new HiveException(String
          .format("Internal Error: attempt to setup a Window for datatype: '%s'", primitiveCategory));
    }
  }
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