Skip to content

Commit b1ad692

Browse files
committed
Clarify variant shredding spec
1 parent 71cf140 commit b1ad692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

VariantShredding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ If the value is an array, `value` must be null.
125125
The list `element` must be a required group.
126126
The `element` group can contain `value` and `typed_value` fields.
127127
The element's `value` field stores the element as Variant-encoded `binary` when the `typed_value` is not present or cannot represent it.
128-
The `typed_value` field may be omitted when not shredding elements as a specific type.
129-
When `typed_value` is omitted, `value` must be `required`.
128+
The `typed_value` field may be omitted when not shredding elements as a specific type. The `value` field may be omitted when shredding elements as a specific type. However, at least one of the two fields must be present.
130129

131130
For example, a `tags` Variant may be shredded as a list of strings using the following definition:
132131
```
@@ -193,6 +192,7 @@ optional group event (VARIANT) {
193192
```
194193

195194
The group for each named field must use repetition level `required`.
195+
Readers may always assume the group is annotated correctly.
196196

197197
A field's `value` and `typed_value` are set to null (missing) to indicate that the field does not exist in the variant.
198198
To encode a field that is present with a null value, the `value` must contain a Variant null: basic type 0 (primitive) and physical type 0 (null).

0 commit comments

Comments
 (0)