@Override
    public Object parse(SourceData sourceData, int rowIndex, Context context) {
        Object stringObj = stringParser.parse(sourceData, rowIndex, context);
        Object startPositionObj = startPositionParser.parse(sourceData, rowIndex, context);
        if (stringObj == null || startPositionObj == null) {
            return null;
        }
        String str = OperatorTools.parseString(stringObj);
        int start = OperatorTools.parseBigDecimal(startPositionObj).intValue();
        if (start > str.length()) {
            return "";
        }
        if (lengthParser != null) {
            Object lengthObj = lengthParser.parse(sourceData, rowIndex, context);
            int len = OperatorTools.parseBigDecimal(lengthObj).intValue();
            if (len <= 0) {
                return "";
            }
            return str.substring(Math.max(start - 1, 0), Math.min(start - 1 + len, str.length()));
        } else {
            return str.substring(Math.max(start - 1, 0));
        }
    }
SubstringFunction  ->  substring(str FROM pos [ FOR len ]) or substring(str,pos,len)
description:
- Return NULL if 'str' is NULL
- Return a substring of 'str' starting from position 'pos' with length 'len' (to the end by default)
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/string/SubstringFunction.java