presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/UnwrapCastInComparison.java/UnwrapCastInComparison/compare
class UnwrapCastInComparison:    private static int compare(Type type, Object first, Object second)
    {
        return type.compareTo(
                Utils.nativeValueToBlock(type, first),
                0,
                Utils.nativeValueToBlock(type, second),
                0);
    }