Skip to content

Draft commit for showing an alternative to FINITE_VECTOR - #633

Open
JFinis wants to merge 1 commit into
apache:masterfrom
JFinis:alternative-to-finite-vector
Open

JFinis wants to merge 1 commit into
apache:masterfrom
JFinis:alternative-to-finite-vector

Conversation

@JFinis

@JFinis JFinis commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

FINITE_VECTOR, as proposed in #624 has two shortcomings that this PR is trying to avoid:

  • This PR does not tie finiteness to the list/vector type but instead to the contained float. This way, we can have finite floats that aren't vectors. They are useful by themselves, so having the finiteness annotation at the type to which it applies makes this more composable.
  • This PR does not introduce FINITE_VECTOR as a new type that basically mimics LIST with a fixed length. Instead, the LIST type itself receives an optional fixed length field. This way, legacy readers can still read vectors and simply interpret them as lists.

Also, by decoupling finiteness from fixed length and not calling it vector, we gain general fixed-size lists for all types, instead of having just some blessed types be able to live in fixed-size lists / vectors.

Rationale for this change

What changes are included in this PR?

Do these changes have PoC implementations?

FINITE_VECTOR, as proposed in apache#624
has two shortcomings that this PR is trying to avoid:

* This PR does not tie finiteness to the list/vector type
  but instead to the contained float. This way, we can have finite
  floats that aren't vectors. They are useful by themselves, so
  having the finiteness annotation at the type to which it applies
  makes this more composable.
* This PR does not introduce FINITE_VECTOR as a new type that basically
  mimics LIST with a fixed length. Instead, the LIST type itself
  receives an optional fixed length field. This way, legacy readers
  can still read vectors and simply interpret them as lists.

Also, by decoupling finiteness from fixed length and not calling it vector, we
gain general fixed-size lists for *all* types, instead of having just some
blessed types be able to live in fixed-size lists / vectors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant