Is your feature request related to a problem or challenge?
Arrow has no canonical type for ranges, i.e. intervals with a lower and an
upper bound. apache/arrow#50027 proposes two canonical extension types for
them, and apache/arrow#50028 adds the spec text and the C++ and Python
implementations. The proposal is being discussed on the Arrow dev mailing
list, and a vote will follow.
Describe the solution you'd like
Support both types in arrow-schema, like the other canonical extension
types:
arrow.fixed_closedness_range: storage Struct<lower: T, upper: T>,
metadata {"closed": "left" | "right" | "both" | "neither"}. All values
share one closedness.
arrow.variable_closedness_range: storage
Struct<lower: T, upper: T, lower_inc: Boolean not null, upper_inc: Boolean not null>,
metadata {}. The inclusivity of each bound is stored per value.
This would also give the proposal its second implementation, which the
canonical extension type process asks for when a type has parameters.
Describe alternatives you've considered
Defining the types as user extension types outside arrow-rs. That works, but
other crates could not rely on a shared definition.
Additional context
Is your feature request related to a problem or challenge?
Arrow has no canonical type for ranges, i.e. intervals with a lower and an
upper bound. apache/arrow#50027 proposes two canonical extension types for
them, and apache/arrow#50028 adds the spec text and the C++ and Python
implementations. The proposal is being discussed on the Arrow dev mailing
list, and a vote will follow.
Describe the solution you'd like
Support both types in
arrow-schema, like the other canonical extensiontypes:
arrow.fixed_closedness_range: storageStruct<lower: T, upper: T>,metadata
{"closed": "left" | "right" | "both" | "neither"}. All valuesshare one closedness.
arrow.variable_closedness_range: storageStruct<lower: T, upper: T, lower_inc: Boolean not null, upper_inc: Boolean not null>,metadata
{}. The inclusivity of each bound is stored per value.This would also give the proposal its second implementation, which the
canonical extension type process asks for when a type has parameters.
Describe alternatives you've considered
Defining the types as user extension types outside arrow-rs. That works, but
other crates could not rely on a shared definition.
Additional context