When Hive provides a list of candidate functions in case of UDFArgumentException such as for the following query:
the list is not sorted, so the output is not deterministic. Also, we have many test cases depending on the ordering. Thus, it's good to sort the list before emitting it.
This should fixes quite a few test case failures when Hive runs in JDK7.