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
Copy file name to clipboardExpand all lines: site/docs/spec.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,8 @@ A table's **schema** is a list of named columns. All data types are either primi
90
90
91
91
For the representations of these types in Avro, ORC, and Parquet file formats, see Appendix A.
92
92
93
+
Default values for fields are supported, see Neted Types below.
94
+
93
95
#### Nested Types
94
96
95
97
A **`struct`** is a tuple of typed values. Each field in the tuple is named and has an integer id that is unique in the table schema. Each field can be either optional or required, meaning that values can (or cannot) be null. Fields may be any type. Fields may have an optional comment or doc string.
@@ -98,6 +100,13 @@ A **`list`** is a collection of values with some element type. The element field
98
100
99
101
A **`map`** is a collection of key-value pairs with a key type and a value type. Both the key field and value field each have an integer id that is unique in the table schema. Map keys are required and map values can be either optional or required. Both map keys and map values may be any type, including nested types.
100
102
103
+
Iceberg supports default-value semantics for fields of nested types (i.e., struct, list and map). Specifically, a field
104
+
of a nested type field can have a default value that will be returned upon reading this field, if it is not manifested.
105
+
The default value can be defined with both required and optional fields. Null default values are allowed with optional
106
+
fields only, and it's behavior is identical to optional fields with no default value, that is a Null is returned upon
107
+
reading this field when it is not manifested.
108
+
109
+
101
110
#### Primitive Types
102
111
103
112
| Primitive type | Description | Requirements |
@@ -692,7 +701,6 @@ This serialization scheme is for storing single values as individual binary valu
0 commit comments