@SuppressWarnings("rawtypes")
    public static int compareValue(Comparable left, Comparable right) {
        if (left == null) {
            return right == null ? 0 : -1;
        }
        if (right == null) {
            return 1;
        }

        if (((Object) left).getClass() == ((Object) right).getClass()) {
            return ObjectUtils.compare(left, right);
        } else {
            try {
                BigDecimal leftValue = parseBigDecimal(left);
                BigDecimal rightValue = parseBigDecimal(right);
                return ObjectUtils.compare(leftValue, rightValue);
            } catch (Exception e) {
                String leftValue = parseString(left);
                String rightValue = parseString(right);
                return ObjectUtils.compare(leftValue, rightValue);
            }
        }
    }
compareValue
@param left
@param right
@return
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/operator/OperatorTools.java