public org.apache.paimon.types.DataType atomic(DataType atomic) {
      if (atomic instanceof org.apache.spark.sql.types.BooleanType) {
        return new BooleanType();
      } else if (atomic instanceof org.apache.spark.sql.types.ByteType) {
        return new TinyIntType();
      } else if (atomic instanceof org.apache.spark.sql.types.ShortType) {
        return new SmallIntType();
      } else if (atomic instanceof org.apache.spark.sql.types.IntegerType) {
        return new IntType();
      } else if (atomic instanceof org.apache.spark.sql.types.LongType) {
        return new BigIntType();
      } else if (atomic instanceof org.apache.spark.sql.types.FloatType) {
        return new FloatType();
      } else if (atomic instanceof org.apache.spark.sql.types.DoubleType) {
        return new DoubleType();
      } else if (atomic instanceof org.apache.spark.sql.types.StringType) {
        return new VarCharType(VarCharType.MAX_LENGTH);
      } else if (atomic instanceof org.apache.spark.sql.types.VarcharType) {
        return new VarCharType(((org.apache.spark.sql.types.VarcharType) atomic).length());
      } else if (atomic instanceof org.apache.spark.sql.types.CharType) {
        return new CharType(((org.apache.spark.sql.types.CharType) atomic).length());
      } else if (atomic instanceof org.apache.spark.sql.types.DateType) {
        return new DateType();
      } else if (atomic instanceof org.apache.spark.sql.types.TimestampType) {
        return new TimestampType();
      } else if (atomic instanceof org.apache.spark.sql.types.DecimalType) {
        return new DecimalType(
            ((org.apache.spark.sql.types.DecimalType) atomic).precision(),
            ((org.apache.spark.sql.types.DecimalType) atomic).scale());
      } else if (atomic instanceof org.apache.spark.sql.types.BinaryType) {
        return new VarBinaryType(VarBinaryType.MAX_LENGTH);
      }

      throw new UnsupportedOperationException("Not a supported type: " + atomic.catalogString());
    }
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