Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-13971

[C++][Compute] Improve top_k/bottom_k Selecters via CRTP

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • C++

    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

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            aocsa Alexander Ocsa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: