public static SingleValueBoundaryScanner getScanner(BoundaryDef start, BoundaryDef end,
      OrderDef orderDef, boolean nullsLast) throws HiveException {
    if (orderDef.getExpressions().size() != 1) {
      throw new HiveException("Internal error: initializing SingleValueBoundaryScanner with"
              + " multiple expression for sorting");
    }
    OrderExpressionDef exprDef = orderDef.getExpressions().get(0);
    PrimitiveObjectInspector pOI = (PrimitiveObjectInspector) exprDef.getOI();

    if (pOI != null) {// non-vectorized codepath: PTFOperator
      PrimitiveCategory primitiveCategory = pOI.getPrimitiveCategory();
      return getBoundaryScanner(start, end, nullsLast, exprDef, primitiveCategory);
    } else { // vectorized codepath: VectorPTFOperator
      String typeString = exprDef.getExprNode().getTypeInfo().getTypeName();
      return getBoundaryScanner(start, end, nullsLast, exprDef, typeString);
    }
  }
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