You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec has a very clear table listing behavior for struct defaults, and makes it clear that a struct column can either have null as its default value, or {}, the default values for its fields should be decomposed.
A non-null default is stored by setting initial-default or write-default to an empty struct ({}) that will use field values set from each field's initial-default or write-default, respectively.
But in the Iceberg REST API spec, both initial-default and write-default are modeled as a PrimitiveTypeValue:
Attempting to POST this to the create table endpoint targeting an iceberg-rest-fixture catalog results in a long Internal Error message, of which an excerpt is:
Cannot create expression literal from org.apache.iceberg.data.GenericRecord: Record(null, null)
Willingness to contribute
I can contribute a fix for this bug independently
I would be willing to contribute a fix for this bug with guidance from the Iceberg community
I cannot contribute a fix for this bug at this time
I'd like to pick this up, since #16612 was closed by the stale bot. Java can't represent a non-null struct default today: SchemaParser turns {} into a GenericRecord that Expressions.lit rejects, and NestedField only accepts null defaults for nested types. Following the review on #16612, I'd add an empty-struct default literal to Literals behind a public factory, accept it as a struct field default, read and write {} in SchemaParser, and allow it for initial-default and write-default in the REST spec. @nssalian does that direction work for you?
Activity
Tishj commentedon Jul 29, 2026
Bump
binarybrain-009 commentedon Oct 29, 2026
I'd like to pick this up, since #16612 was closed by the stale bot. Java can't represent a non-null struct default today:
SchemaParserturns{}into aGenericRecordthatExpressions.litrejects, andNestedFieldonly accepts null defaults for nested types. Following the review on #16612, I'd add an empty-struct default literal toLiteralsbehind a public factory, accept it as a struct field default, read and write{}inSchemaParser, and allow it forinitial-defaultandwrite-defaultin the REST spec. @nssalian does that direction work for you?