zeroshade commented on code in PR #591:
URL: https://github.com/apache/parquet-format/pull/591#discussion_r3493077552


##########
VariantEncoding.md:
##########
@@ -42,13 +42,14 @@ The [Variant Shredding specification](VariantShredding.md) 
describes the details
 
 ## Variant in Parquet
 
-A Variant value in Parquet is represented by a group with 2 fields, named 
`value` and `metadata`.
+An unshredded Variant value in Parquet is represented by a group with 2 
fields, named `value` and `metadata`.
+A shredded Variant value adds a `typed_value` field, and may omit `value` when 
all values can be represented by `typed_value`.
 
 * The Variant group must be annotated with the `VARIANT` logical type.
-* Both fields `value` and `metadata` must be of type `binary` (called 
`BYTE_ARRAY` in the Parquet thrift definition).
+* The `metadata` field must be of type `binary` (called `BYTE_ARRAY` in the 
Parquet thrift definition). When present, the `value` field must also be of 
type `binary`.
 * The `metadata` field is `required` and must be a valid Variant metadata, as 
defined below.
-* The `value` field must be annotated as `required` for unshredded Variant 
values, or `optional` if parts of the value are [shredded](VariantShredding.md) 
as typed Parquet columns.
-* When present, the `value` field must be a valid Variant value, as defined 
below. 
+* The `value` field must be annotated as `required` for unshredded Variant 
values, or omitted or annotated as `optional` if the Variant value is 
[shredded](VariantShredding.md) as typed Parquet columns.

Review Comment:
   not a fan of the wording of "or omitted or annotated" maybe something like:
   
   > The `value` field must be annotated as `required` for unshredded Variant 
values. If the Variant value is [shredded](VariantShredding.md) as typed 
Parquet columns, then then `value` field may be annotated as `optional` or 
omitted entirely if ALL values can be represented in the typed column.



-- 
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]

Reply via email to