Hoeze opened a new pull request, #11371:
URL: https://github.com/apache/arrow-rs/pull/11371

   # Which issue does this PR close?
   
   - Closes #11370.
   
   # Rationale for this change
   
   apache/arrow#50028 proposes two canonical extension types for ranges, i.e.
   intervals with a lower and an upper bound over an orderable type T. This PR
   adds them to `arrow-schema` as an independent Rust implementation. The types
   only become canonical after the vote on the Arrow dev mailing list, so this 
PR
   should not be merged before the vote passes.
   
   # What changes are included in this PR?
   
   - `FixedClosednessRange` (`arrow.fixed_closedness_range`): storage
     `Struct<lower: T, upper: T>`, metadata
     `{"closed": "left" | "right" | "both" | "neither"}`.
   - `VariableClosednessRange` (`arrow.variable_closedness_range`): storage
     `Struct<lower: T, upper: T, lower_inc: Boolean, upper_inc: Boolean>`,
     metadata `{}`.
   - Both are wired into `CanonicalExtensionType`.
   
   Metadata handling and storage validation follow the C++ implementation:
   unknown metadata keys are ignored, and each bound may be nullable or not.
   
   # Are these changes tested?
   
   Yes, with unit tests for both types: metadata round trips, and rejection of
   invalid metadata and storage types.
   
   Note that I made heavy use of AI to create this PR and copied many structures
   from the existing `Opaque` and tensor extension types. I reviewed each change
   and hope the changes I made are meaningful.
   
   # Are there any user-facing changes?
   
   Yes, but only additions behind the `canonical_extension_types` feature.
   `CanonicalExtensionType` is `#[non_exhaustive]`, so the new variants are not
   breaking.


-- 
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]

Reply via email to