rdblue commented on code in PR #460:
URL: https://github.com/apache/parquet-format/pull/460#discussion_r1809441575
##########
LogicalTypes.md:
##########
@@ -563,6 +563,23 @@ defined by the [BSON specification][bson-spec].
The sort order used for `BSON` is unsigned byte-wise comparison.
+### VARIANT
+
+`VARIANT` is used for a Variant value. It must annotate a group. The group must
+contain a `binary` field named `metadata`, and a `binary` field named `value`.
+The `VARIANT` annotated group can be used to store either an unshredded Variant
+value, or a shredded Variant value.
+
+* The top level must be a group annotated with `VARIANT` that contains a
+ `binary` field named `metadata`, and a `binary` field named `value`.
Review Comment:
Can you take some of the changes I've made in #461 here? I think we need to
be more specific. Here's what I wrote up:
```
The Variant group must be annotated with the `VARIANT` logical type.
Both fields `value` and `metadata` are of type `binary`.
The `metadata` field is required and must be a valid Variant metadata, as
defined below.
The `variant_value` field is optional.
When present, the `variant_value` field must be a valid Variant value, as
defined below.
The `variant_value` field may be null only when parts of the Variant value
are shredded according to the Variant Shreedding spec.
This is the expected representation in Parquet:
optional group variant_event (VARIANT) {
required binary metadata;
optional binary variant_value;
}
```
--
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]