Ian Cook created ARROW-13167:
--------------------------------
Summary: [C++] Type determination kernels ("type", "type_id")
Key: ARROW-13167
URL: https://issues.apache.org/jira/browse/ARROW-13167
Project: Apache Arrow
Issue Type: Improvement
Components: C++
Reporter: Ian Cook
The Arrow C++ library exposes an API for determining the data type of an
expression, but it is exposed as a method of the expression class and it
requires that the user pass a schema as an argument to the method. This is
inconvenient; for example, we have had to write some inconsistent code in the R
bindings to make expression objects carry schemas along with them and then pass
the schemas to derivative expressions, unifying schemas as needed for
derivative expressions that take 2+ expressions as arguments.
This would be much cleaner if we could use the kernel function calling
interface to call a unary {{type_id}} function that would simply determine the
type of its input datum and return a scalar integer value from the data type
enum indicating the its data type. It would be convenient to also have a
version of this that returned the string description of the data type; I think
this could be named {{type}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)