amogh-jahagirdar commented on code in PR #13310: URL: https://github.com/apache/iceberg/pull/13310#discussion_r2191440182
########## spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/source/SparkMetadataColumn.java: ########## @@ -20,17 +20,40 @@ import org.apache.spark.sql.connector.catalog.MetadataColumn; import org.apache.spark.sql.types.DataType; +import org.apache.spark.sql.types.MetadataBuilder; public class SparkMetadataColumn implements MetadataColumn { private final String name; private final DataType dataType; private final boolean isNullable; + private final boolean preserveOnReinsert; + private final boolean preserveOnUpdate; + private final boolean preserveOnDelete; public SparkMetadataColumn(String name, DataType dataType, boolean isNullable) { + this( + name, + dataType, + isNullable, + MetadataColumn.PRESERVE_ON_REINSERT_DEFAULT, + MetadataColumn.PRESERVE_ON_UPDATE_DEFAULT, + MetadataColumn.PRESERVE_ON_DELETE_DEFAULT); + } + + public SparkMetadataColumn( + String name, + DataType dataType, + boolean isNullable, Review Comment: We could do a builder or at minimum I think I should probably inline comment these arguments when they're passed in so it's clear and you don't need to step into the definition. But the builder seems the cleanest -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org