rdblue commented on code in PR #12211: URL: https://github.com/apache/iceberg/pull/12211#discussion_r1954993890
########## api/src/main/java/org/apache/iceberg/UpdateSchema.java: ########## @@ -67,24 +70,52 @@ default UpdateSchema addColumn(String name, Type type) { } /** - * Add a new top-level column. + * Add a new optional top-level column. * * <p>Because "." may be interpreted as a column path separator or may be used in field names, it * is not allowed in names passed to this method. To add to nested structures or to add fields * with names that contain ".", use {@link #addColumn(String, String, Type)}. * * <p>If type is a nested type, its field IDs are reassigned when added to the existing schema. * + * <p>The added column will be optional with a null default value. + * * @param name name for the new column * @param type type for the new column * @param doc documentation string for the new column * @return this for method chaining * @throws IllegalArgumentException If name contains "." */ - UpdateSchema addColumn(String name, Type type, String doc); + default UpdateSchema addColumn(String name, Type type, String doc) { Review Comment: Yes, but I don't think it is a good idea. This API is user-facing and we don't want users to need to understand the distinction between initial default and write default. This API is supposed to match SQL capabilities and is higher level. -- 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