Skip to content

Commit

Permalink
Clarify cases where a value is required but missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Oct 24, 2024
1 parent be6c6c6 commit 7a6cd7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion VariantShredding.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Each `value` field may have an associated shredded field named `typed_value` tha

For example, a Variant field, `measurement` may be shredded as long values by adding `typed_value` with type `int64`:
```
optional group measurement (VARIANT) {
required group measurement (VARIANT) {
required binary metadata;
optional binary value;
optional int64 typed_value;
Expand Down Expand Up @@ -76,6 +76,9 @@ An object is _partially shredded_ when the `value` is an object and the `typed_v

If both fields are non-null and either is not an object, the value is invalid. Readers must either fail or return the `typed_value`.

If a Variant is missing in a context where a value is required, readers must either fail or return a Variant null: basic type 0 (primitive) and physical type 0 (null).
For example, if a Variant is required (like `measurement` above) and both `value` and `typed_value` are null, the returned `value` must be `00` (Variant null).

### Shredded Value Types

Shredded values must use the following Parquet types:
Expand Down

0 comments on commit 7a6cd7c

Please sign in to comment.