public org.apache.paimon.types.DataType struct(
        StructType struct, List<org.apache.paimon.types.DataType> fieldResults) {
      StructField[] fields = struct.fields();
      List<DataField> newFields = new ArrayList<>(fields.length);
      for (int i = 0; i < fields.length; i += 1) {
        StructField field = fields[i];
        org.apache.paimon.types.DataType fieldType = fieldResults.get(i).copy(field.nullable());
        String comment = field.getComment().getOrElse(() -> null);
        newFields.add(new DataField(i, field.name(), fieldType, comment));
      }

      return new RowType(newFields);
    }
For simplicity, as a temporary solution, we directly convert the non-null attribute to
nullable on the Spark side.
amoro-format-paimon/src/main/java/org/apache/amoro/formats/paimon/PaimonTypeToSparkType.java