You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alexander (Jira)" <ji...@apache.org> on 2021/09/10 02:21:00 UTC

[jira] [Created] (ARROW-13971) [C++][Compute] Improve top_k/bottom_k Selecters via CRTP

Alexander created ARROW-13971:
---------------------------------

             Summary: [C++][Compute] Improve top_k/bottom_k Selecters via CRTP
                 Key: ARROW-13971
                 URL: https://issues.apache.org/jira/browse/ARROW-13971
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Alexander


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|https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern], 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

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)