private JsonToLogDataConverter<T> createStructConverter(Type type) {
    final List<Types.NestedField> fields = type.asNestedType().asStructType().fields();
    final Type[] fieldTypes = fields.stream().map(Types.NestedField::type).toArray(Type[]::new);
    final String[] fieldNames = fields.stream().map(Types.NestedField::name).toArray(String[]::new);
    final List<JsonToLogDataConverter<T>> fieldConverters =
        Arrays.stream(fieldTypes).map(this::createConverter).collect(Collectors.toList());

    return (jsonNode, context) -> {
      ObjectNode node = (ObjectNode) jsonNode;
      int arity = fieldNames.length;
      Object[] struct = new Object[arity];
      for (int i = 0; i < arity; i++) {
        String fieldName = fieldNames[i];
        JsonNode field = node.get(fieldName);
        Object convertedField = convertField(fieldConverters.get(i), fieldName, field, context);
        struct[i] = convertedField;
      }

      return factory.createActualValue(struct, fieldTypes);
    };
  }
Converter to convert {@link JsonNode} to log data.

@param <T> to indicate the log data type
amoro-format-iceberg/src/main/java/org/apache/amoro/log/JsonToLogDataConverters.java