class DiscoveryTypeComparator extends StandardTypeComparator {
    @Override
    public int compare(@Nullable Object left, @Nullable Object right) throws SpelEvaluationException {<FILL_FUNCTION_BODY>}
}

        if (left == null) {
            return right == null ? 0 : -1;
        } else if (right == null) {
            return 1;
        }

        try {
            BigDecimal leftValue = new BigDecimal(left.toString());
            BigDecimal rightValue = new BigDecimal(right.toString());

            return super.compare(leftValue, rightValue);
        } catch (Exception e) {

        }

        return super.compare(left, right);
    
<no_super_class>