Ben Kietzman created ARROW-13122:
------------------------------------
Summary: [C++][Compute] Dispatch* should examine options as well
as input types
Key: ARROW-13122
URL: https://issues.apache.org/jira/browse/ARROW-13122
Project: Apache Arrow
Issue Type: Improvement
Components: C++
Reporter: Ben Kietzman
{{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
--
This message was sent by Atlassian Jira
(v8.3.4#803005)