RussellSpitzer commented on code in PR #12841:
URL: https://github.com/apache/iceberg/pull/12841#discussion_r2059225620
##########
format/spec.md:
##########
@@ -266,7 +266,11 @@ The `initial-default` is set only when a field is added to
an existing schema. T
The `initial-default` and `write-default` produce SQL default value behavior,
without rewriting data files. SQL default value behavior when a field is added
handles all existing rows as though the rows were written with the new field's
default value. Default value changes may only affect future records and all
known fields are written into data files. Omitting a known field when writing a
data file is never allowed. The write default for a field must be written if a
field is not supplied to a write. If the write default for a required field is
not set, the writer must fail.
-All columns of `unknown`, `geometry`, and `geography` types must default to
null. Non-null values for `initial-default` or `write-default` are invalid.
+All columns of `unknown`, `variant`, `geometry`, and `geography` types must
default to null. Non-null values for `initial-default` or `write-default` are
invalid.
+
+Default values for the fields of a struct are tracked as `initial-default` and
`write-default` at the field level. Default values for fields that are nested
structs must not contain default values for the struct's fields (sub-fields).
Sub-field defaults are tracked in sub-field's metadata. As a result, the
default stored for a nested struct may be either null or a non-null struct with
no field values. The actual default value is produced by setting each field
default in a new struct.
Review Comment:
non-null struct with no field values => empty struct?
```
The actual default value is produced by setting each field default in a new
struct.
```
Do we mean "New structs are produced by applying/combining all sub-field
defaults."
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]