rok commented on code in PR #624:
URL: https://github.com/apache/parquet-format/pull/624#discussion_r4478958288
##########
LogicalTypes.md:
##########
@@ -1097,6 +1097,48 @@ optional group my_map (MAP_KEY_VALUE) {
}
```
+### Finite Vectors
+
+`FINITE_VECTOR` is used to annotate fixed-length ordered sequences of finite
and
+non-null elements.
+
+`FiniteVectorType` annotation has one required parameter, `num_elements`,
+which is the number of elements in each non-null vector and MUST be greater
+than zero.
+
+`FINITE_VECTOR` MUST always annotate the canonical 3-level structure:
+
+```
+<vector-repetition> group <name> (FINITE_VECTOR(<num_elements>)) {
+ repeated group list {
+ required <element-type> element;
+ }
+}
+```
+
+The element types supported are:
+
+* unannotated `BOOLEAN`, `FLOAT` or `DOUBLE`
+* `INT32` or `INT64`, either unannotated or annotated with `INTEGER` or
+ `DECIMAL`
+* `FIXED_LEN_BYTE_ARRAY` annotated with `FLOAT16` or `DECIMAL`.
Review Comment:
Fixed width allows for some optimizations that variable width doesn't. I
believe allowing variable-width types would make writers more complex as they'd
have to enable or disable these optimizations at write time.
If it turns out there's a need for this we can revisit later too!
--
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]