See discussion here:
#8621 (comment)
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 (#8621 we compute a vector on each Exec call. This should be done only once and cached in the kernel state instead.
Reporter: Maarten Breddels / @maartenbreddels
Related issues:
Note: This issue was originally created as ARROW-10556. Please see the migration documentation for further details.