@Override
    public Object parse(SourceData sourceData, int rowIndex, Context context) {
        Object stringObject = stringParser.parse(sourceData, rowIndex, context);
        if (stringObject == null) {
            return null;
        }
        Charset charset = DEFAULT_CHARSET;
        if (charSetNameParser != null) {
            charset = Charset.forName(OperatorTools.parseString(
                    charSetNameParser.parse(sourceData, rowIndex, context)));
        }
        String str = OperatorTools.parseString(stringObject);
        return str.getBytes(charset).length;
    }
LengthFunction  ->  length(string,[charset])
description:
- return NULL if the string is NULL
- return the byte length of the string
Note: charset defaults to matching with JVM.
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/string/LengthFunction.java