alamb opened a new issue #1313: URL: https://github.com/apache/arrow-rs/issues/1313
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** https://github.com/apache/arrow-rs/issues/1300 adds `DictionaryArray::try_new()` for creating `DictionaryArrays` from existing keys and dictionaries. However, as noted by @jhorstmann in https://github.com/apache/arrow-rs/issues/1300#issuecomment-1037978864 this results in a double validation (that the keys and values are valid arrays, when we know they already are, in addition to validating that all the keys are valid indexes into the dictionary. **Describe the solution you'd like** Minimize the checking in `DictionaryArray::try_new()` to only verify that all indexes are within the range of the dictionary, which is required for this to be a safe API. It also might be worth adding a `unsafe DictionaryArray::new_unchecked()` which builds the arrays from data the user asserts is valid. -- 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]
