@Override
    public Object parse(SourceData sourceData, int rowIndex, Context context) {
        Object numberObj = numberParser.parse(sourceData, rowIndex, context);
        Object reservedDigitsObj = reservedDigitsParser.parse(sourceData, rowIndex, context);
        if (numberObj == null || reservedDigitsObj == null) {
            return null;
        }
        BigDecimal number = OperatorTools.parseBigDecimal(numberObj);
        int reservedDigits = OperatorTools.parseBigDecimal(reservedDigitsObj).intValue();
        if (reservedDigits < 0) {
            reservedDigits = 0;
        }
        // build format
        StringBuilder pattern = new StringBuilder("#,###");
        if (reservedDigits > 0) {
            pattern.append(".");
            for (int i = 0; i < reservedDigits; i++) {
                pattern.append("0");
            }
        }
        number = number.setScale(reservedDigits, RoundingMode.HALF_UP);
        DecimalFormat df = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US);
        df.applyPattern(pattern.toString());
        return df.format(number);
    }
FormatFunction  ->  FORMAT(X,D)
description:
return NULL if X or D is NULL.
return the result of formatting the number X to "#,###,###.##" format, rounded to D decimal places.
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/string/FormatFunction.java