HIVE-7334: make the comparator serializable