[ https://issues.apache.org/jira/browse/ARROW-13167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17368974#comment-17368974 ]
Antoine Pitrou commented on ARROW-13167: ---------------------------------------- I don't understand why this needs to be a kernel. This seems to be an abuse of the general idea of compute functions. > [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 > Priority: Major > > 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)