presto-main/src/main/java/io/prestosql/operator/scalar/ArraySortComparatorFunction.java/ArraySortComparatorFunction/comparatorResult
class ArraySortComparatorFunction:    private static int comparatorResult(Long result)
    {
        checkCondition(
                (result != null) && ((result == -1) || (result == 0) || (result == 1)),
                INVALID_FUNCTION_ARGUMENT,
                "Lambda comparator must return either -1, 0, or 1");
        return result.intValue();
    }