private String getNodeValue(List<PbNode> childNodes, DynamicMessage root) {
        String fieldValue = "";
        DynamicMessage current = root;
        for (int i = 0; i < childNodes.size(); i++) {
            PbNode node = childNodes.get(i);
            Object nodeValue = current.getField(node.getFieldDesc());
            if (nodeValue == null) {
                // error data
                break;
            }
            if (node.isLastNode()) {
                switch (node.getFieldDesc().getJavaType()) {
                    case STRING:
                    case INT:
                    case LONG:
                    case FLOAT:
                    case DOUBLE:
                    case BOOLEAN:
                        fieldValue = String.valueOf(nodeValue);
                        break;
                    case BYTE_STRING:
                        ByteString byteString = (ByteString) nodeValue;
                        fieldValue = new String(byteString.toByteArray(), srcCharset);
                        break;
                    case ENUM:
                        fieldValue = String.valueOf(nodeValue);
                        break;
                    case MESSAGE:
                        fieldValue = String.valueOf(nodeValue);
                        break;
                }
                break;
            }
            if (!node.isArray()) {
                if (!(nodeValue instanceof DynamicMessage)) {
                    // error data
                    break;
                }
                current = (DynamicMessage) nodeValue;
            } else {
                if (!(nodeValue instanceof List)) {
                    // error data
                    break;
                }
                List<?> nodeList = (List<?>) nodeValue;
                if (node.getArrayIndex() >= nodeList.size()) {
                    // error data
                    break;
                }
                Object nodeElement = nodeList.get(node.getArrayIndex());
                if (!(nodeElement instanceof DynamicMessage)) {
                    // error data
                    break;
                }
                current = (DynamicMessage) nodeElement;
            }
        }
        return fieldValue;
    }
getNodeValue
@param childNodes
@param root
@return
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/decode/PbSourceData.java