You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2020/11/19 23:45:00 UTC

[jira] [Commented] (ARROW-10556) [C++] Caching pre computed data based on FunctionOptions in the kernel state

    [ https://issues.apache.org/jira/browse/ARROW-10556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235792#comment-17235792 ] 

Wes McKinney commented on ARROW-10556:
--------------------------------------

Isn't this what the init function is for?

https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_set_lookup.cc#L160

> [C++] Caching pre computed data based on FunctionOptions in the kernel state
> ----------------------------------------------------------------------------
>
>                 Key: ARROW-10556
>                 URL: https://issues.apache.org/jira/browse/ARROW-10556
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Maarten Breddels
>            Priority: Major
>
> See discussion here:
> [https://github.com/apache/arrow/pull/8621#issuecomment-724796243]
>  
> A kernel might need to pre-compute something based on the function options passed. Since the Kernel-FunctionOptions mapping is not 1-to-1, it does not make sense to store this in the function option object. 
> Currently, match_substring calculates a `prefix_table` on each Exec call. In trim ([https://github.com/apache/arrow/pull/8621)] we compute a vector<bool> on each Exec call. This should be done only once and cached in the kernel state instead.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)