@Override
    public Object parse(SourceData sourceData, int rowIndex, Context context) {
        // parse data
        Object stringObject = stringParser.parse(sourceData, rowIndex, context);
        if (stringObject == null) {
            return null;
        }
        String str = OperatorTools.parseString(stringObject);
        if (str.isEmpty()) {
            return "";
        } else if (str.startsWith("null")) {
            return null;
        }
        // parse uncompress type
        String uncompressType = DEFAULT_UNCOMPRESS_TYPE;
        if (uncompressTypeParser != null) {
            Object compressTypeObj = uncompressTypeParser.parse(sourceData, rowIndex, context);
            if (compressTypeObj != null) {
                uncompressType = OperatorTools.parseString(compressTypeObj);
            }
        }
        uncompressType = uncompressType.toLowerCase();
        // uncompress
        try {
            // The first four bytes are the data length
            byte[] compressData = Arrays.copyOfRange(str.getBytes(CHARSET), 4, str.length());
            UncompressHandler handler = UnCompressionAlgorithmFactory.getCompressHandlerByName(uncompressType);
            if (handler == null) {
                throw new RuntimeException(uncompressType + " is not supported.");
            }
            return new String(handler.uncompress(compressData));
        } catch (Exception e) {
            log.error("UnCompression failed", e);
            return null;
        }
    }
UnCompressFunction -> uncompress(string_to_uncompress [,compress_type])
description:
- Return NULL if 'string_to_uncompress' is NULL;
- Return "" if 'string_to_uncompress' is "";
- Return the result as a string.
Note: This function supports three compression algorithms: deflater, gzip, and zip. compress_type defaults to defer.
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/compression/UnCompressFunction.java