@SuppressWarnings("unchecked")
    private Map<String, Descriptors.FileDescriptor> init(DescriptorProtos.FileDescriptorSet fileDescSet)
        throws Descriptors.DescriptorValidationException {
        // check for dupes
        Set<String> allFdProtoNames = new HashSet<String>();
        for (DescriptorProtos.FileDescriptorProto fdProto : fileDescSet.getFileList()) {
            if (allFdProtoNames.contains(fdProto.getName())) {
                throw new IllegalArgumentException("duplicate name: " + fdProto.getName());
            }
            allFdProtoNames.add(fdProto.getName());
        }

        // build FileDescriptors, resolve dependencies (imports) if any
        Map<String, Descriptors.FileDescriptor> resolvedFileDescMap = new HashMap<String, Descriptors.FileDescriptor>();
        while (resolvedFileDescMap.size() < fileDescSet.getFileCount()) {
            for (DescriptorProtos.FileDescriptorProto fdProto : fileDescSet.getFileList()) {
                if (resolvedFileDescMap.containsKey(fdProto.getName())) {
                    continue;
                }

                // getDependencyList() signature was changed and broke compatibility in 2.6.1; workaround
                // with reflection
                // List<String> dependencyList = fdProto.getDependencyList();
                List<String> dependencyList = null;
                try {
                    Method m = fdProto.getClass().getMethod("getDependencyList", (Class<?>[]) null);
                    dependencyList = (List<String>) m.invoke(fdProto, (Object[]) null);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }

                List<Descriptors.FileDescriptor> resolvedFdList = new ArrayList<Descriptors.FileDescriptor>();
                for (String depName : dependencyList) {
                    if (!allFdProtoNames.contains(depName)) {
                        throw new IllegalArgumentException(
                            "cannot resolve import " + depName + " in " + fdProto.getName());
                    }
                    Descriptors.FileDescriptor fd = resolvedFileDescMap.get(depName);
                    if (fd != null) {
                        resolvedFdList.add(fd);
                    }
                }

                if (resolvedFdList.size() == dependencyList.size()) { // dependencies resolved
                    Descriptors.FileDescriptor[] fds = new Descriptors.FileDescriptor[resolvedFdList.size()];
                    Descriptors.FileDescriptor fd = Descriptors.FileDescriptor.buildFrom(fdProto,
                        resolvedFdList.toArray(fds));
                    resolvedFileDescMap.put(fdProto.getName(), fd);
                }
            }
        }

        return resolvedFileDescMap;
    }
Returns a string representation of the schema

@return the schema string
core/src/main/java/kafka/automq/table/deserializer/proto/schema/DynamicSchema.java