Skip to content

Remove lifetime from DynComparator #543

@alamb

Description

@alamb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-changeChanges to the arrow APIarrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions