Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
As it was mentioned here:
https://github.com/apache/arrow/pull/11019#discussion_r701349253
Selecters for SelectKUnstable all have a relatively similar core structure. It might be worth considering how some templating (e.g. via CRTP, or via a set of helper comparator/iteration templates) could let you factor out the core algorithm and the container-specific bits.
It would then be easier to also try to share generated code between types with the same physical type (e.g. as mentioned, Int64, Timestamp, and Date64 should all use the same generated code underneath). This issue related to create template specialization functions for these types was also mentioned here:
https://github.com/apache/arrow/pull/11019#discussion_r700238908