Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove lifetime from DynComparator #543

Closed
alamb opened this issue Jul 13, 2021 · 0 comments · Fixed by #542
Closed

Remove lifetime from DynComparator #543

alamb opened this issue Jul 13, 2021 · 0 comments · Fixed by #542
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

Comments

@alamb
Copy link
Contributor

alamb commented Jul 13, 2021

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

@alamb alamb added the enhancement Any new improvement worthy of a entry in the changelog label Jul 13, 2021
@alamb alamb added api-change Changes to the arrow API arrow Changes to the arrow crate labels Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant