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

   # Which issue does this PR close?
   
   - Closes https://github.com/apache/arrow-rs/issues/7700
   
   This commit introduces `ShortString`, a newtype that wraps around `&str` 
that enforces a maximum length constraint. This also allows us to perform 
validation once and removes a superfluous validation check in `append_value`. 
   
   The now-superflous validation check was needed since users could construct 
`Variant::ShortString`s directly, without doing input validation. This means 
you can have a short string variant which actually contains a string that is no 
longer than 63 bytes. 
   
   But since we enforce this check upon construction, we can directly match 
against `Variant::String` and `Variant::ShortString` arms with their respective 
appending functions (`append_string` and `append_short_string`). 
   


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