← Back to Pull requests

GH-430: [Format] Add FINITE_VECTOR logical type with LIST storage #624

Merged
rok merged 2 files (57 lines) on Nov 10, 2026 07:46 UTC
View on GitHub
rok rok commented on Sep 22, 2026 14:46 UTC
Author

Rationale for this change

Discussion on the ML led to a decision to split the logical annotation proposal from the original proposal, which also aimed to provide a physical representation. This PR proposes the logical annotation only, to address the need for a logical vector type.

Naming: the annotation is called FINITE_VECTOR (previously VECTOR in this PR) so that the name carries the contract: fixed length, non-null and finite elements. This leaves VECTOR available should a future proposal introduce a more general vector type or a dedicated physical representation.

---
This adds a FINITE_VECTOR logical type stored as a canonical 3-level LIST structure. This is a contract on top of LIST, not a new physical representation:

1. Each non-null vector contains exactly num_elements elements.
2. Elements are required (non-null) and finite (no NaN, +Inf or -Inf).
3. Elements are numeric or boolean Parquet primitives.

<vector-repetition> group <name> (FINITE_VECTOR(<num_elements>)) {
  repeated group list {
    required <element-type> element;
  }
}

  • Element types: BOOLEAN, INT32/INT64 (plain, INT or DECIMAL), FLOAT, DOUBLE, FLOAT16 and FLBA DECIMAL. No nested elements.

  • Writers must enforce the element count, non-null and finite guarantees. Readers may rely on them without validating.

  • Levels, pages, encodings, statistics and bloom filters are those of the element column in an ordinary LIST. No statistics are defined for whole vectors.

  • Writers set ConvertedType.LIST alongside LogicalType.FINITE_VECTOR. Readers that fall back to the converted type read an ordinary LIST; readers that ignore both annotations see an unannotated group with a single repeated child group.
  • Trade-offs:
    Repetition/definition levels are still written. Reader and writer efficiency is left to the implementations.
    Adding new float types (e.g. FP8, BF16) requires adding a primitive Parquet type. Packed FLBA(num_elements type_width) storage would decouple this, at the cost of element-level encodings.

    Out of scope:
    Vector indexes, quantisation and normalisation guarantees. Those need their own annotations rather than parameters on FiniteVectorType.
    A more efficient physical type for storing fixed-sized lists may be proposed in the future and this logical type may be able to annotate it. This is intentionally left out of this proposal.

    What changes are included in this PR?

    Specifies the FINITE_VECTOR logical type, its LIST representation, writer/reader requirements and element-level requirements.

    Do these changes have PoC implementations?

    parquet-cpp / pyarrow: https://github.com/apache/arrow/pull/55348

  • parquet-java: https://github.com/apache/parquet-java/pull/3876
  • Diff: 57 lines (+57 / -0) across 2 files Reviewer: divjotarora Review duration: 70139m
    All Vouch review confidence checks passed
    Residual risk 0.03 = Change Risk (0.29) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.29 · 57 lines diff across 2 files
    0.29
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.90 · 5 substantive comment(s)
    0.90
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    91%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.243
    Real PR Conversation Timeline
    41 items
    danielcweeks danielcweeks commented on code on Sep 22, 2026 16:50 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.

    I don't think we should include nan_count since we forbid it above. I'm not clear on the representation for upper_lower bounds unless this is saying that it's the min/max element value, which doesn't make a whole lot of sense to me. Similar to list, I think we would just omit the upper/lower bounds and distinct count.

    danielcweeks danielcweeks commented on code on Sep 22, 2026 16:51 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.
    +
    +For floating-point element columns, any `nan_count` or entry in `nan_counts`
    +that is written MUST be zero. Readers that recognize `VECTOR` MAY rely on its
    +finite-element contract even when these statistics are absent.

    This paragraph is just restating what was already above, so I'd remove it.

    RussellSpitzer RussellSpitzer commented on code on Sep 22, 2026 19:01 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,9 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be

    I think Dan mentioned this below, but we can could probably just say "readers may assume nan_count = 0" and not store it.

    rok rok commented on code on Sep 22, 2026 19:12 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.

    How about this:

    The sort order of `VECTOR` values is undefined and no statistics are defined
    for whole vectors. Min/max values, `distinct_count`, column-index bounds,
    and Bloom filters retain their ordinary LIST meaning. Bounds and distinct
    counts describe scalar elements. Writers may omit them.
    

    rok rok commented on code on Sep 22, 2026 19:20 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.
    +
    +For floating-point element columns, any `nan_count` or entry in `nan_counts`
    +that is written MUST be zero. Readers that recognize `VECTOR` MAY rely on its
    +finite-element contract even when these statistics are absent.

    Agreed.

    rok rok commented on code on Sep 22, 2026 19:34 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,9 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    +    * zero when present.

    @RussellSpitzer how about this?

        * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
        * If the column is the element leaf of a VECTOR, whose elements MUST by
        * convention always be finite (see LogicalTypes.md) writers SHOULD omit
        * nan_count field and readers MAY assume nan_count == 0.
    

    rok rok commented on code on Sep 22, 2026 19:34 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -1366,7 +1387,10 @@ struct ColumnIndex {
         * A list containing the number of NaN values for each page. Only present
         * for columns of physical type FLOAT or DOUBLE, or logical type FLOAT16.
         * If this field is not present, readers MUST assume that there might be
    -    * NaN values in any page.
    +    * NaN values in any page, except if the column is an element leaf of a
    +    * VECTOR, whose elements MUST by convention always be finite (see
    +    * LogicalTypes.md). For such a column, every entry in nan_counts MUST
    +    * be zero when present.

    @RussellSpitzer continued from above

        * NaN values in any page, except if the column is an element leaf of a
        * VECTOR, whose elements MUST by convention always be finite (see
        * LogicalTypes.md), writers SHOULD omit nan_counts field and
        * readers MAY assume nan_counts == 0.
    

    rok rok commented on code on Sep 22, 2026 19:37 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.

    I'm not clear on the representation for upper_lower bounds unless this is saying that it's the min/max element value, which doesn't make a whole lot of sense to me.

    It's meant as element-level (sub-row) statistics and can be omitted by writer.

    rok rok commented on code on Sep 22, 2026 19:39 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,9 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    HuaHuaY HuaHuaY commented on Sep 23, 2026 07:37 UTC
    Contributor

    Sorry I haven't followed VECTOR type progress in a while. Why was Option B mentioned in the email from May eliminated? I see that only Option A and Option C1 are left in the email from September.

    rok rok commented on Sep 23, 2026 08:33 UTC
    Author

    Option B mentioned in the email from May eliminated? I see that only Option A and Option C1 are left in the email from September.

    Thanks for the question @HuaHuaY ! Option B requires changes to physical layout of data - either via new repetition level or another mechanism. As logical and physical changes are somewhat independent and should likely both be done, we decided to propose them separately. So in short Option B is not eliminated, only delayed until logical type for vectors is settled. Apologies this was not clear from my communication.

    alamb alamb commented on code on Sep 23, 2026 19:01 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be

    I think now the sentence is cut off -- "nan_count MUST be" (must be what ? 0?)

    I also don't see why we need to add a note for vector here -- the vector logical type spec says there can be no nans so then it follows nan_count must be zero. It seems unecessary to explicitly specify it

    alamb alamb commented on code on Sep 23, 2026 19:05 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.

    I also don't understand why we would need to call special handling for vector out -- isn't it the same interpretation as for any other type (as in for what type is min/max values not interpreted as metadata over the elements)?

    alamb alamb commented on Sep 23, 2026 19:06 UTC
    Reviewer

    The proposal seems pretty good to me -- I think there are some places where we could reduce its size and make it more concise, but the high level idea looks good

    rok rok commented on code on Sep 23, 2026 21:31 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be

        * convention always be finite (see LogicalTypes.md) nan_count MUST be
        * zero when present.
    

    rok rok commented on code on Sep 23, 2026 21:33 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be

    Thanks for catching this! I think it's resolved now.

    rok rok commented on code on Sep 23, 2026 21:36 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,13 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    +    * zero when present.
    +    * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).

    rok rok commented on code on Sep 23, 2026 21:41 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined and no statistics are defined
    +for whole vectors. Min/max values, `distinct_count`, column-index bounds,
    +and Bloom filters retain their ordinary LIST meaning. Bounds and distinct
    +counts describe scalar elements. Writers may omit them.
    +

    @alamb is this the right amount of detail?

    The sort order of `VECTOR` values is undefined and no statistics are defined
    for whole vectors.
    

    rok rok commented on code on Sep 23, 2026 21:44 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,90 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined. Column min/max values,
    +`nan_count`, `distinct_count`, column-index bounds, and Bloom filter membership
    +must be interpreted as metadata over all individual vector elements.
    alamb alamb commented on code on Sep 24, 2026 18:36 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    +    * zero when present.
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) writers SHOULD omit

    this still seems overly specific to me. If the logical type forbids nans, why do we also need to specify anything about the statistics?

    I would expect writers that write Vector logical type simply don't write nan statistics

    alamb alamb commented on code on Sep 24, 2026 18:37 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined and no statistics are defined
    +for whole vectors. Min/max values, `distinct_count`, column-index bounds,
    +and Bloom filters retain their ordinary LIST meaning. Bounds and distinct
    +counts describe scalar elements. Writers may omit them.
    +

    yeah that makes sense to me. Thank you

    alamb alamb commented on code on Sep 24, 2026 18:38 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,

    Do we need to say this explicitly? I feel like this just reiterates that the physical storage is a list 🤔

    divjotarora divjotarora commented on code on Sep 26, 2026 20:43 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    +    * zero when present.
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) writers SHOULD omit

    +1, the current wording feels too specific / repetitive. First sentence says if nan_count is set, it must be 0. Second one says writers should omit nan_count and readers may assume it's 0. Can we just remove all of this? Agreed that writers likely won't emit nan_count for vectors and when they do, it's 0 by design. Anything non-zero is wrong.

    divjotarora divjotarora commented on code on Sep 26, 2026 20:47 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -479,6 +485,22 @@ struct GeographyType {
     struct FileType {
     }
     
    +/**
    +* Fixed length vector logical type annotation
    +*
    +* Annotates the outer group of a canonical 3-level LIST structure whose
    +* element leaf is a required numeric or boolean Parquet primitive type.
    +* Group elements, including LIST, MAP, and VECTOR, are not allowed.
    +* Every non-null vector MUST contain exactly num_elements of this type and
    +* these elements MUST be finite: NaN, positive or negative infinity are not
    +* allowed. Vector nullability is determined by the outer group being optional
    +* or required.
    +* See LogicalTypes.md for details.

    Much of this is repeating what's in the other file. Can we just say something like:

    Fixed-length vector logical type annotation
    
    Annotates the outer group of a three-level LIST structure. Each
    non-null list MUST contain exactly num_elements elements.
    
    See LogicalTypes.md for details.
    

    divjotarora divjotarora commented on code on Sep 26, 2026 20:50 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not

    [nit] I'd remove Group elements...are not allowed. The supported list of types below is an allowlist, anything not in it is disallowed by definition

    divjotarora divjotarora commented on code on Sep 26, 2026 20:51 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors

    [nit] Suggest removing Whole vectors... as it's unrelated to the finite value constraint. Vectors being null is already covered above:

    The outer level must be a group with `logicalType` set to `VECTOR` and
      `converted_type` set to `LIST`. Its repetition must either be `optional` or
      `required` and determines whether the vector may be null. It must contain a
      single field named `list`.
    

    divjotarora divjotarora commented on code on Sep 26, 2026 20:53 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.
    +
    +Definition and repetition levels, value counts, encodings, compression,
    +encryption, page boundaries, statistics, column indexes, size statistics, and
    +Bloom filters are those of the primitive element column in an ordinary `LIST`.
    +Encodings and metadata apply to elements rather than complete vectors.
    +`VECTOR` adds no requirement that one vector be contained in a single data
    +page.
    +
    +The sort order of `VECTOR` values is undefined and no statistics are defined
    +for whole vectors. Min/max values, `distinct_count`, column-index bounds,
    +and Bloom filters retain their ordinary LIST meaning. Bounds and distinct
    +counts describe scalar elements. Writers may omit them.
    +

    +1

    divjotarora divjotarora approved these changes on Sep 26, 2026 20:55 UTC
    Approved Reviewer

    Small wording comments, but overall LGTM. Thanks for driving this @rok!

    PFischbeck PFischbeck commented on code on Sep 28, 2026 14:31 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -479,6 +485,22 @@ struct GeographyType {
     struct FileType {
     }
     
    +/**
    +* Fixed length vector logical type annotation
    +*
    +* Annotates the outer group of a canonical 3-level LIST structure whose
    +* element leaf is a required numeric or boolean Parquet primitive type.
    +* Group elements, including LIST, MAP, and VECTOR, are not allowed.
    +* Every non-null vector MUST contain exactly num_elements of this type and
    +* these elements MUST be finite: NaN, positive or negative infinity are not
    +* allowed. Vector nullability is determined by the outer group being optional
    +* or required.
    +* See LogicalTypes.md for details.

    Agreed, this can be shortened, similar to how it is done for the FileType.

    PFischbeck PFischbeck commented on code on Sep 28, 2026 14:34 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -1366,7 +1390,10 @@ struct ColumnIndex {
         * A list containing the number of NaN values for each page. Only present
         * for columns of physical type FLOAT or DOUBLE, or logical type FLOAT16.
         * If this field is not present, readers MUST assume that there might be
    -    * NaN values in any page.
    +    * NaN values in any page, except if the column is an element leaf of a
    +    * VECTOR, whose elements MUST by convention always be finite (see
    +    * LogicalTypes.md), writers SHOULD omit nan_counts field and
    +    * readers MAY assume nan_counts == 0.

    This sentence structure is a bit confusing, due to the added , writers SHOULD omit.... How about splitting the sentence:

    * NaN values in any page, except if the column is an element leaf of a
    * VECTOR, whose elements MUST by convention always be finite (see
    * LogicalTypes.md). In this case, writers SHOULD omit nan_counts field and
    * readers MAY assume nan_counts == 0.
    

    PFischbeck PFischbeck commented on code on Sep 28, 2026 14:36 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:

    nit: should must be capitalized in this and the next paragraph?

    PFischbeck PFischbeck commented on code on Sep 28, 2026 14:40 UTC
    Code Review
    LogicalTypes.md:1
    @@ -1097,6 +1097,88 @@ optional group my_map (MAP_KEY_VALUE) {
     }
     ```
     
    +### Vectors
    +
    +`VECTOR` is used to annotate fixed-length ordered sequences of finite and
    +non-null elements.
    +
    +`VectorType` annotation has one required parameter, `num_elements`, which is
    +the number of elements in each non-null vector and must be greater than zero.
    +
    +`VECTOR` must always annotate the canonical 3-level structure:
    +
    +```
    +<vector-repetition> group <name> (VECTOR(<num_elements>)) {
    +  repeated group list {
    +    required <element-type> element;
    +  }
    +}
    +```
    +
    +* The outer level must be a group with `logicalType` set to `VECTOR` and
    +  `converted_type` set to `LIST`. Its repetition must either be `optional` or
    +  `required` and determines whether the vector may be null. It must contain a
    +  single field named `list`.
    +* The middle level must be a repeated group named `list` with a single field
    +  named `element`.
    +* The element MUST be a `required` primitive field, individual elements MUST
    +  NOT be null. Group elements, including `LIST`, `MAP`, and `VECTOR`, are not
    +  allowed.
    +
    +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`.
    +
    +The 2-level structures accepted for `LIST` under its backward-compatibility
    +rules are not valid for `VECTOR`.
    +
    +Every numeric element MUST be finite. For `FLOAT`, `DOUBLE`, and `FLOAT16`,
    +this excludes NaN, positive infinity, and negative infinity. Whole vectors
    +may still be null when the outer group is `optional`.
    +
    +For example, a nullable vector containing 768 required `FLOAT` elements is:
    +
    +```
    +optional group embedding (VECTOR(768)) {
    +  repeated group list {
    +    required float element;
    +  }
    +}
    +```
    +
    +Every non-null vector must contain exactly `num_elements` elements.
    +Because `num_elements` is greater than zero, a non-null vector cannot be empty.
    +Writers MUST enforce element count, non-null-element, and finite-element
    +requirements. Readers MAY rely on these requirements without validating them. A
    +reader that detects a different element count, a null element, or a non-finite
    +element MUST treat the data as invalid.
    +
    +For example, with `num_elements = 3` and a `required float element`,
    +`[1.0, 2.0, 3.0]` is valid. `[1.0, null, 3.0]`, `[null, null, null]`,
    +`[1.0, NaN, 3.0]`, and `[1.0, +Infinity, 3.0]` are invalid. A null vector
    +is valid only when the outer group is `optional`.

    We could add an invalid example with 2 or 4 elements here.

    PFischbeck PFischbeck commented on code on Sep 28, 2026 14:44 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    +    * zero when present.
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by

    I think due to some repeated editing, this paragraph is now present twice with slight variations.

    PFischbeck PFischbeck approved these changes on Sep 28, 2026 14:45 UTC
    Approved Reviewer

    Overall looks good to me!

    rok rok commented on code on Oct 30, 2026 11:46 UTC
    Code Review
    src/main/thrift/parquet.thrift:1
    @@ -314,6 +314,12 @@ struct Statistics {
         * or DOUBLE, or logical type is FLOAT16.
         * If this field is not present, readers MUST assume NaNs may be present
         * (i.e. MUST assume nan_count > 0 and MAY NOT assume nan_count == 0).
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) nan_count MUST be
    +    * zero when present.
    +    * If the column is the element leaf of a VECTOR, whose elements MUST by
    +    * convention always be finite (see LogicalTypes.md) writers SHOULD omit

    Removing.

    alamb alamb commented on Oct 31, 2026 10:42 UTC
    Reviewer

    This reads cleanly to me now and I think clearly and precisely describes the new type. Thank you @rok

    rok rok commented on Oct 31, 2026 21:38 UTC
    Author

    Thanks for the reviews @alamb and @wgtmac!
    I tried to address all open comments. Also changed VECTOR -> FINITE_VECTOR as discussed on the ML. I feel the name better describes the application we're aiming for.

    JigaoLuo JigaoLuo commented on Nov 01, 2026 19:00 UTC
    Contributor

    Thanks for driving this!

    I’ve also been following the Iceberg vector proposal, and I’d like to raise two points about vector's metadata for discussion.

    I agree that min/max statistics don’t make sense for vectors. However, there is other metadata that would make vector data more self-describing. It could live in Parquet or in Iceberg:
    1. Distance function. See the reasoning from Harsha and the related discussion on the Iceberg side: https://docs.google.com/document/d/1zA8PskNDFKXXJpzWQr25CFoX_aIZHBNHbkxk0t3PteE/edit?disco=AAACDqu3oWI&pli=1
    2. Lineage: which embedding model or API produced the vectors.

    Just raising for discussion.

    rok rok commented on Nov 01, 2026 21:43 UTC
    Author

    Hey @JigaoLuo thanks for reviewing! Discussion on points you raise would better fit the discusson on the ML (1, 2). I'll still try to reply here, but if you want to push this further the dev@parquet ML is the platform you should use.

    there is other metadata that would make vector data more self-describing. It could live in Parquet or in Iceberg:

    > 1. Distance function. See the reasoning from Harsha and the related discussion on the Iceberg side: https://docs.google.com/document/d/1zA8PskNDFKXXJpzWQr25CFoX_aIZHBNHbkxk0t3PteE/edit?disco=AAACDqu3oWI&pli=1

    I am not an embeddings or vector DB expert, but wouldn't distance metric always an operation acting on pairs of vectors? It feels more like an application level concern and parquet already has a file-level metadata key-value metadata where such information could be stored. Or am I missing something here that could not be captured there?

    2. Lineage: which embedding model or API produced the vectors.

    Agreed that this is important information, but I'm not sure it's something that should live in the type. It would make parquet more self-contained, but it would require agreement on model identity between embedding producers which is out of reach for parquet. If you feel strongly about this, please sketch out how you imagine this would look like.

    JigaoLuo JigaoLuo commented on Nov 02, 2026 09:49 UTC
    Contributor

    Hi @rok Thanks for sharing these. I'll go through the two discussions.

    It feels more like an application level concern and parquet already has a file-level metadata key-value metadata where such information could be stored.

    On point 1, I think this is a good place for it.

    Reviewers
    Assignees
    rok rok
    Labels
    risk: low confidence: 91.2% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 28.7% (LOW) · Higher = larger blast radius
    28.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 91.2% · Lower = rushed or shallow review
    91.2%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2.5% · Safe to merge
    2.5%