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

[C++][Compute] Dispatch* should examine options as well as input types

    XMLWordPrintableJSON

Details

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

    Description

      Function::Dispatch* should have access to options as well as argument types.

      This will allow kernel authors to write kernels which are specific to certain configurations of options. Otherwise we may be leaving performance on the table when for example a function's output could be contiguously preallocated, but only for the default FunctionOptions. Currently the author would have no choice but to choose the lowest-common-denominator flags for the kernel.

      In another vein, "cast" is currently a MetaFunction instead of a ScalarFunction since it derives its output type from CastOptions. This requires a special case in Expressions since Expressions can only represent calls to scalar functions. Ideally a function which is semantically scalar like "cast" wouldn't need to resort to using a MetaFunction for dispatch

      See also: https://github.com/apache/arrow/pull/10547#discussion_r654573800

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: