Remove lifetime from DynComparator #543
Labels
api-change
Changes to the arrow API
arrow
Changes to the arrow crate
enhancement
Any new improvement worthy of a entry in the changelog
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The cost of building a comparator (initialising a DynComparator) is often significantly higher than the actual cost of executing the comparator's closure on two row IDs. Therefore it makes sense to build the comparator once, and re-use the returned DynComparator for each row you are comparing the two arrays on.
Due to the explicit lifetime of DynComparator I recently found it problematic to store the DynComparator on an object that was used across threads in an async environment.
Describe the solution you'd like
Remove lifetime from DynComparator
The text was updated successfully, but these errors were encountered: