public static int compareNull(Object o1, Object o2) {
    if (o1 == null) {
      return o2 == null ? 0 : 1;
    } else if (o2 == null) {
      return -1;
    }
    return 0;
  }
Compare two arrays of objects with their respective arrays of
ObjectInspectors.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java