alamb opened a new issue, #7814:
URL: https://github.com/apache/arrow-rs/issues/7814

   
   
   If I'm understanding correctly... 
   * We need a map (not necessarily ordered) in order to cheaply find the field 
id for a given field name. 
   * We need a vec that remembers insertion order?
   * The map cannot reference strings in the vec, unless we're willing to mess 
with interior mutability and "fun" like that (but in theory we _could_ use a 
hashmap that stores indexes into the vec, with a fancy custom indirect hasher)
   * The vec cannot reference strings in the map, because there's no stable way 
to reference the strings it hosts.
   
   Have we considered using an 
[IndexSet](https://docs.rs/indexmap/latest/indexmap/set/struct.IndexSet.html)? 
An `IndexSet<String>` should behave like a `Vec<String>` but with O(1) cost to 
return the index of any entry.
   
   _Originally posted by @scovich in 
https://github.com/apache/arrow-rs/pull/7795#discussion_r2170081589_
               


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