private static boolean compareTimes(Object valueThis, Object valueThat) {
    Timestamp d1 = valueThis instanceof Timestamp ? (Timestamp) valueThis : new Timestamp((LocalDateTime) valueThis);
    Timestamp d2 = valueThat instanceof Timestamp ? (Timestamp) valueThat : new Timestamp((LocalDateTime) valueThat);

    int diff = d1.compareTo(d2);
    if (diff != 0){
      LOG.info("Timestamps aren't equal: {} <-> {}", d1, d2);
    }
    return diff == 0;
  }
Special equality method for datetime fields in a Record. This is because hive's Timestamp
after being serialized and de-serialized ends up becoming a LocalDateTime, and a TimeStamp.equals
(LocalDateTime) would simply return non-equality, even if the inner LocalDateTime instance points to the
same moment in time as the other LocalDateTime instance.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/queryhistory/schema/QueryHistorySchemaTestUtils.java