Repository navigation
Conversation
Add the spec text for arrow.fixed_closedness_range and arrow.variable_closedness_range. The C++ and Python implementation stays in a separate pull request.
Hoeze
marked this pull request as ready for review
October 11, 2026 18:04
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The specification incorrectly describes potentially unbounded ranges as bounded sets.
1 open finding
What changed in this PR
Adds canonical format specifications for fixed- and variable-closedness range extension types.
Changes:
- Defines storage layouts, nullability, and range semantics.
- Specifies closedness metadata and serialization rules.
| File | Description |
|---|---|
docs/source/format/CanonicalExtensions.rst |
Documents both canonical range extension types. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Fixed closedness range | ||
| ====================== | ||
|
|
||
| Fixed closedness range represents a bounded set (mathematical interval) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Rationale for this change
This PR adds the spec text for two range canonical extension types (#50027). It is cherry-picked from the C++ and Python prototype in #50028.
A range is an interval with a lower and an upper bound:
arrow.fixed_closedness_range: the closedness (left,right,bothorneither) is a type parameter shared by all values. This fits discrete ranges such as PostgreSQL'sint4rangeordaterange, and pandas'IntervalArray.arrow.variable_closedness_range: the inclusivity of each bound is stored per value. Continuous ranges such as PostgreSQL'snumrangeortstzrangeneed this, because one column can hold both[1, 5]and(1, 5).The names follow the existing
arrow.fixed_shape_tensor/arrow.variable_shape_tensorpair.What changes are included in this PR?
Spec text for both types in
CanonicalExtensions.rst.Both use a
Struct<lower: T, upper: T>storage, and the variable type adds two non-nullable booleanslower_incandupper_inc.T may be any orderable type, bounds are compared with the order of T, and only a null bound means an unbounded side.
Are these changes tested?
This PR changes only documentation.
Are there any user-facing changes?
Yes, two new canonical extension types in the format documentation. There are no breaking changes.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: