public boolean areEqual(Object[] ol0, Object[] ol1) {
    if (ol0.length != numFields || ol1.length != numFields) {
      if (ol0.length != ol1.length) {
        return false;
      }
      assert (ol0.length <= numFields);
      assert (ol1.length <= numFields);
      for (int i = 0; i < Math.min(ol0.length, ol1.length); i++) {
        if (!fieldComparers[i].areEqual(ol0[i], ol1[i])) {
          return false;
        }
      }
      return true;
    }

    for (int i = numFields - 1; i >= 0; i--) {
      if (!fieldComparers[i].areEqual(ol0[i], ol1[i])) {
        return false;
      }
    }
    return true;
  }
ol0, ol1 should have equal or less number of elements than objectinspectors
passed in constructor.

@param ol0
@param ol1
@return True if object in ol0 and ol1 are all identical
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ListObjectsEqualComparer.java